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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (download) (annotate)
Sat Oct 4 23:33:09 1997 UTC (22 years, 9 months ago) by monnier
File size: 680 byte(s)
Initial revision
(* unix-glue.sml
 *
 * COPYRIGHT (c) 1995 AT&T Bell Laboratories.
 * COPYRIGHT (c) 1989-1991 John H. Reppy
 *
 * The Glue for the UNIX version of CML.
 *)

structure UnixGlue : OS_GLUE =
  struct

    fun init () = TimeOut.reset()

    fun pollOS () = (
	  TimeOut.pollTime();
	  IOManager.pollIO();
	  ProcManager.pollProcs())

    fun pause () = (case TimeOut.anyWaiting()
	   of NONE => if (IOManager.anyWaiting() orelse ProcManager.anyWaiting())
		then (Signals.pause(); true)
		else false
(** NOTE: eventually, we should just go to sleep for the specified time **)
	    | (SOME t) => (Signals.pause(); true)
	  (* end case *))

    fun shutdown () = TimeOut.reset()

  end;


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