source: rtems/cpukit/posix/include/rtems/posix/psignal.h @ bf95ccb5

4.104.114.95
Last change on this file since bf95ccb5 was bf95ccb5, checked in by Thomas Doerfler <Thomas.Doerfler@…>, on 05/27/08 at 10:34:15

Added const qualifier to various pointers and data tables to

reduce size of data area.
IMFS: Fixed creation of symbolic links to avoid a compiler warning.
DOSFS: Use LibBlock? instead of read() to read the boot record.

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