2 * 2004 Matthew Fluet (mfluet@acm.org)
3 * Ported to MLton threads.
8 * COPYRIGHT (c) 1995 AT&T Bell Laboratories.
9 * COPYRIGHT (c) 1989-1991 John H. Reppy
12 signature SCHEDULER_HOOKS =
14 type 'a thread = 'a RepTypes.thread
15 type rdy_thread = RepTypes.rdy_thread
17 (* this hook gets invoked when the scheduler has nothing else to do;
18 * it is invoked in an atomic region
20 val pauseHook : (unit -> rdy_thread) ref
22 (* this hook points to a thread that gets invoked when
23 * the system is otherwise deadlocked. It takes two arguments:
24 * the first is a boolean flag that says weather to do clean-up,
25 * and the second is the exit status.
27 val shutdownHook : (bool * OS.Process.status) thread ref
29 val reset : unit -> unit