Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cml/src/Unix/unix-glue.sml
ViewVC logotype

Annotation of /sml/trunk/src/cml/src/Unix/unix-glue.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (view) (download)

1 : monnier 2 (* unix-glue.sml
2 :     *
3 :     * COPYRIGHT (c) 1995 AT&T Bell Laboratories.
4 :     * COPYRIGHT (c) 1989-1991 John H. Reppy
5 :     *
6 :     * The Glue for the UNIX version of CML.
7 :     *)
8 :    
9 :     structure UnixGlue : OS_GLUE =
10 :     struct
11 :    
12 :     fun init () = TimeOut.reset()
13 :    
14 :     fun pollOS () = (
15 :     TimeOut.pollTime();
16 :     IOManager.pollIO();
17 :     ProcManager.pollProcs())
18 :    
19 :     fun pause () = (case TimeOut.anyWaiting()
20 :     of NONE => if (IOManager.anyWaiting() orelse ProcManager.anyWaiting())
21 :     then (Signals.pause(); true)
22 :     else false
23 :     (** NOTE: eventually, we should just go to sleep for the specified time **)
24 :     | (SOME t) => (Signals.pause(); true)
25 :     (* end case *))
26 :    
27 :     fun shutdown () = TimeOut.reset()
28 :    
29 :     end;
30 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0