source: vendor/emx/current/src/dos/signal.inc

Last change on this file was 18, checked in by bird, 22 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 4.3 KB
Line 
1;
2; SIGNAL.INC -- Signal processing
3;
4; Copyright (c) 1991-1998 by Eberhard Mattes
5;
6; This file is part of emx.
7;
8; emx is free software; you can redistribute it and/or modify it
9; under the terms of the GNU General Public License as published by
10; the Free Software Foundation; either version 2, or (at your option)
11; any later version.
12;
13; emx is distributed in the hope that it will be useful,
14; but WITHOUT ANY WARRANTY; without even the implied warranty of
15; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16; GNU General Public License for more details.
17;
18; You should have received a copy of the GNU General Public License
19; along with emx; see the file COPYING. If not, write to
20; the Free Software Foundation, 59 Temple Place - Suite 330,
21; Boston, MA 02111-1307, USA.
22;
23; See emx.asm for a special exception.
24;
25
26;
27; Cf. /emx/include/signal.h
28;
29SIGHUP = 1 ; Hangup
30SIGINT = 2 ; Interrupt (Ctrl-C)
31SIGQUIT = 3 ; Quit
32SIGILL = 4 ; Illegal instruction
33SIGTRAP = 5 ; Single step (debugging)
34SIGABRT = 6 ; abort ()
35SIGEMT = 7 ; ???
36SIGFPE = 8 ; Floating point
37SIGKILL = 9 ; Kill process
38SIGBUS = 10 ; ???
39SIGSEGV = 11 ; Segmentation fault
40SIGSYS = 12 ; Invalid argument to system call
41SIGPIPE = 13 ; Broken pipe
42SIGALRM = 14 ; Alarm
43SIGTERM = 15 ; Termination, process killed
44SIGUSR1 = 16 ; User-defined signal #1
45SIGUSR2 = 17 ; User-defined signal #2
46SIGCLD = 18 ; Death of a child process
47SIGBREAK = 21 ; Break (Ctrl-Break)
48SIGWINCH = 28 ; Window size change
49
50SIGNALS = 29 ; Signals 0..28
51
52;
53; Cf. /emx/include/signal.h
54;
55SIG_DFL = 0 ; Default handler
56SIG_IGN = 1 ; Ignore signal
57SIG_ACK = 4 ; Acknowledges receipt of a signal
58
59SIG_ERR = -1 ; Return value of signal()
60
61SA_NOCLDSTOP = 0001H ; See POSIX.1
62SA_SYSV = 0002H ; Reset to SIG_DFL
63SA_ACK = 0004H ; Don't unblock automatically
64SA_TRAP = 8000H ; Signal generated by an exception
65
66SIG_BLOCK = 1
67SIG_UNBLOCK = 2
68SIG_SETMASK = 3
69
70;
71; struct sigaction
72;
73SIGACTION STRUC
74SA_HANDLER DD ?
75SA_MASK DD ?
76SA_FLAGS DD ?
77SIGACTION ENDS
78
79;
80; Stack frame for signal handlers
81;
82SIGFRAME STRUC
83SF_EIP DD ?
84SF_ARG DD ?
85SF_SIGNATURE DD ?
86SF_SIGNO DD ?
87SF_FLAGS DD ?
88SF_MASK DD ?
89SIGFRAME ENDS
90
91SIG_BLOCK_MASK = NOT (1 SHL SIGKILL)
92
93SIG_SIGNATURE = 9A003CFFH ; See PMINT.ASM & EXCEPT.ASM for details
94SIG_EIP = -42 ; Beyond CS limit
95
96 IFNDEF __SIGNAL
97
98SV_DATA SEGMENT
99
100 EXTRN CRIT_ERR_FLAG:BYTE
101 EXTRN SIG_CORE:BYTE ; Signals which dump core
102 EXTRN SIG_VALID:BYTE ; Valid signal numbers
103 EXTRN EMERGENCY_TIMER:BYTE ; Timer for emergency exit
104 EXTRN EMERGENCY_FLAG:BYTE ; Flag for emergency exit
105
106SV_DATA ENDS
107
108
109SV_CODE SEGMENT
110
111 EXTRN SIG_DELIVER_PENDING:NEAR ; Deliver pending signals
112 EXTRN SIG_USER_CALL:NEAR ; Invoke user signal handler
113 EXTRN SIG_RETURN:NEAR ; Return from signal handler
114 EXTRN SIG_MSG:NEAR ; Display "Stopped by ..."
115 EXTRN DO_SIGNAL:NEAR ; Implement __signal()
116 EXTRN DO_SIGACTION:NEAR ; Implement __sigaction()
117SV_CODE ENDS
118
119
120INIT_CODE SEGMENT
121
122 EXTRN HOOK_INT:NEAR ; Hook interrupts
123 EXTRN CLEANUP_SIGNAL:NEAR ; Remove interrupt hooks
124
125INIT_CODE ENDS
126
127 ENDIF
Note: See TracBrowser for help on using the repository browser.