source: rtems/cpukit/posix/include/rtems/posix/psignal.h @ 07d880f4

4.104.114.84.95
Last change on this file since 07d880f4 was 07d880f4, checked in by Joel Sherrill <joel.sherrill@…>, on 01/31/99 at 20:45:31

Split psignal.c into many more files. This reduced the amount of
object code that has to be loaded just for initializing the signal
manager.

  • Property mode set to 100644
File size: 2.4 KB
Line 
1/*
2 *  $Id$
3 */
4
5#ifndef __RTEMS_POSIX_SIGNALS_h
6#define __RTEMS_POSIX_SIGNALS_h
7
8#include <rtems/posix/pthread.h>
9
10/*
11 *  Currently 32 signals numbered 1-32 are defined
12 */
13
14#define SIGNAL_EMPTY_MASK  0x00000000
15#define SIGNAL_ALL_MASK    0xffffffff
16
17#define signo_to_mask( _sig ) (1 << ((_sig) - 1))
18
19#define is_valid_signo( _sig ) \
20  ((_sig) >= 1 && (_sig) <= 32 )
21
22#define _States_Is_interruptible_signal( _states ) \
23  ( ((_states) & \
24    (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
25      (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
26
27#define SIGACTION_TERMINATE \
28  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abormal_termination_handler} }
29#define SIGACTION_IGNORE \
30  { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
31#define SIGACTION_STOP \
32  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
33#define SIGACTION_CONTINUE \
34  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
35
36#define SIG_ARRAY_MAX  (SIGRTMAX + 1)
37
38/*
39 *  Variables
40 */
41
42extern sigset_t  _POSIX_signals_Pending;
43
44extern struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
45
46extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
47
48extern Watchdog_Control _POSIX_signals_Alarm_timer;
49
50extern Thread_queue_Control _POSIX_signals_Wait_queue;
51
52extern Chain_Control _POSIX_signals_Inactive_siginfo;
53
54extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
55
56/*
57 *  POSIX internal siginfo structure
58 */
59
60typedef struct {
61  Chain_Node  Node;
62  siginfo_t   Info;
63}  POSIX_signals_Siginfo_node;
64
65/*
66 *  Internal routines
67 */
68
69void _POSIX_signals_Manager_Initialization(
70  int  maximum_queued_signals
71);
72
73void _POSIX_signals_Post_switch_extension(
74  Thread_Control  *the_thread
75);
76
77boolean _POSIX_signals_Unblock_thread(
78  Thread_Control  *the_thread,
79  int              signo,
80  siginfo_t       *info
81);
82
83boolean _POSIX_signals_Clear_signals(
84  POSIX_API_Control  *api,
85  int                 signo,
86  siginfo_t          *info,
87  boolean             is_global,
88  boolean             check_blocked
89);
90
91int killinfo(
92  pid_t               pid,
93  int                 sig,
94  const union sigval *value
95);
96
97void _POSIX_signals_Set_process_signals(
98  sigset_t   mask
99);
100
101void _POSIX_signals_Set_process_signals(
102  sigset_t   mask
103);
104
105/*
106 *  Default signal handlers
107 */
108
109#define _POSIX_signals_Stop_handler NULL
110#define _POSIX_signals_Continue_handler NULL
111
112void _POSIX_signals_Abormal_termination_handler( int signo );
113
114#endif
115/* end of file */
Note: See TracBrowser for help on using the repository browser.