| 1 | (* Copyright (C) 1999-2006 Henry Cejtin, Matthew Fluet, Suresh |
| 2 | * Jagannathan, and Stephen Weeks. |
| 3 | * Copyright (C) 1997-2000 NEC Research Institute. |
| 4 | * |
| 5 | * MLton is released under a BSD-style license. |
| 6 | * See the file MLton-LICENSE for details. |
| 7 | *) |
| 8 | |
| 9 | signature MLTON_SIGNAL = |
| 10 | sig |
| 11 | type t |
| 12 | type signal = t |
| 13 | |
| 14 | structure Handler: |
| 15 | sig |
| 16 | type t |
| 17 | |
| 18 | val default: t |
| 19 | val handler: (MLtonThread.Runnable.t -> MLtonThread.Runnable.t) -> t |
| 20 | val ignore: t |
| 21 | val isDefault: t -> bool |
| 22 | val isIgnore: t -> bool |
| 23 | val simple: (unit -> unit) -> t |
| 24 | end |
| 25 | |
| 26 | structure Mask: |
| 27 | sig |
| 28 | type t |
| 29 | |
| 30 | val all: t |
| 31 | val allBut: signal list -> t |
| 32 | val block: t -> unit |
| 33 | val getBlocked: unit -> t |
| 34 | val isMember: t * signal -> bool |
| 35 | val none: t |
| 36 | val setBlocked: t -> unit |
| 37 | val some: signal list -> t |
| 38 | val unblock: t -> unit |
| 39 | end |
| 40 | |
| 41 | val getHandler: t -> Handler.t |
| 42 | val handled: unit -> Mask.t |
| 43 | val prof: t |
| 44 | val restart: bool ref |
| 45 | val setHandler: t * Handler.t -> unit |
| 46 | (* suspend m temporarily sets the signal mask to m and suspends until an |
| 47 | * unmasked signal is received and handled, and then resets the mask. |
| 48 | *) |
| 49 | val suspend: Mask.t -> unit |
| 50 | val vtalrm: t |
| 51 | end |
| 52 | |
| 53 | signature MLTON_SIGNAL_EXTRA = |
| 54 | sig |
| 55 | include MLTON_SIGNAL |
| 56 | |
| 57 | val handleGC: (unit -> unit) -> unit |
| 58 | end |