| 1 |
(* scheduler-hooks.sig |
| 2 |
* 2004 Matthew Fluet ([email protected]) |
| 3 |
* Ported to MLton threads. |
| 4 |
*) |
| 5 |
|
| 6 |
(* scheduler.sml |
| 7 |
* |
| 8 |
* COPYRIGHT (c) 1995 AT&T Bell Laboratories. |
| 9 |
* COPYRIGHT (c) 1989-1991 John H. Reppy |
| 10 |
*) |
| 11 |
|
| 12 |
signature SCHEDULER_HOOKS = |
| 13 |
sig |
| 14 |
type 'a thread = 'a RepTypes.thread |
| 15 |
type rdy_thread = RepTypes.rdy_thread |
| 16 |
|
| 17 |
(* this hook gets invoked when the scheduler has nothing else to do; |
| 18 |
* it is invoked in an atomic region |
| 19 |
*) |
| 20 |
val pauseHook : (unit -> rdy_thread) ref |
| 21 |
|
| 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. |
| 26 |
*) |
| 27 |
val shutdownHook : (bool * OS.Process.status) thread ref |
| 28 |
|
| 29 |
val reset : unit -> unit |
| 30 |
end |