Debian Codegraph @

basis-library/posix/signal.sml

raw
1 (* Copyright (C) 1999-2006, 2008 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 HPND-style license.
6 * See the file MLton-LICENSE for details.
7 *)
8
9 structure PosixSignal: POSIX_SIGNAL_EXTRA =
10 struct
11 open PrimitiveFFI.Posix.Signal
12 structure Signal = PrePosix.Signal
13
14 type signal = Signal.t
15
16 val abrt = Signal.fromRep SIGABRT
17 val alrm = Signal.fromRep SIGALRM
18 val bus = Signal.fromRep SIGBUS
19 val chld = Signal.fromRep SIGCHLD
20 val cont = Signal.fromRep SIGCONT
21 val fpe = Signal.fromRep SIGFPE
22 val hup = Signal.fromRep SIGHUP
23 val ill = Signal.fromRep SIGILL
24 val int = Signal.fromRep SIGINT
25 val kill = Signal.fromRep SIGKILL
26 val pipe = Signal.fromRep SIGPIPE
27 val poll = Signal.fromRep SIGPOLL
28 val prof = Signal.fromRep SIGPROF
29 val quit = Signal.fromRep SIGQUIT
30 val segv = Signal.fromRep SIGSEGV
31 val stop = Signal.fromRep SIGSTOP
32 val sys = Signal.fromRep SIGSYS
33 val term = Signal.fromRep SIGTERM
34 val trap = Signal.fromRep SIGTRAP
35 val tstp = Signal.fromRep SIGTSTP
36 val ttin = Signal.fromRep SIGTTIN
37 val ttou = Signal.fromRep SIGTTOU
38 val urg = Signal.fromRep SIGURG
39 val usr1 = Signal.fromRep SIGUSR1
40 val usr2 = Signal.fromRep SIGUSR2
41 val vtalrm = Signal.fromRep SIGVTALRM
42 val xcpu = Signal.fromRep SIGXCPU
43 val xfsz = Signal.fromRep SIGXFSZ
44
45 val fromRep = Signal.fromRep
46 val toRep = Signal.toRep
47
48 val repToInt = C_Int.toInt
49 val repFromInt = C_Int.fromInt
50
51 val toInt = repToInt o toRep
52 val fromInt = fromRep o repFromInt
53
54 val repToWord = C_Int.castToSysWord
55 val repFromWord = C_Int.castFromSysWord
56
57 val toWord = repToWord o toRep
58 val fromWord = fromRep o repFromWord
59 end