1 /* Embedded systems may want the simulated signals if no other form exists,
2 but UNIX versions will want to use the host facilities.
3 Define SIMULATED_SIGNALS when you want to use the simulated versions.
8 <<raise>>---send a signal
17 int raise(int <[sig]>);
19 int _raise_r(void *<[reent]>, int <[sig]>);
22 Send the signal <[sig]> (one of the macros from `<<sys/signal.h>>').
23 This interrupts your program's normal flow of execution, and allows a signal
24 handler (if you've defined one, using <<signal>>) to take control.
26 The alternate function <<_raise_r>> is a reentrant version. The extra
27 argument <[reent]> is a pointer to a reentrancy structure.
30 The result is <<0>> if <[sig]> was successfully raised, <<1>>
31 otherwise. However, the return value (since it depends on the normal
32 flow of execution) may not be visible, unless the signal handler for
33 <[sig]> terminates with a <<return>> or unless <<SIG_IGN>> is in
34 effect for this signal.
37 ANSI C requires <<raise>>, but allows the full set of signal numbers
38 to vary from one implementation to another.
40 Required OS subroutines: <<getpid>>, <<kill>>.
43 #ifndef SIGNAL_PROVIDED
57 return _raise_r (_REENT
, sig
);
63 _raise_r (struct _reent
*reent
,
66 return _kill_r (reent
, _getpid_r (reent
), sig
);
69 #endif /* SIGNAL_PROVIDED */