source: rtems/cpukit/posix/include/rtems/posix/psignal.h @ 654e1f3

4.104.115
Last change on this file since 654e1f3 was 654e1f3, checked in by Ralf Corsepius <ralf.corsepius@…>, on 12/04/09 at 15:30:08

Reflect having split out posix/include/rtems/posix/sigset.h.

  • Property mode set to 100644
File size: 2.6 KB
Line 
1/**
2 * @file rtems/posix/psignal.h
3 */
4
5/*
6 *  COPYRIGHT (c) 1989-2008.
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#include <rtems/posix/sigset.h>
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_Abnormal_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 const 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 Watchdog_Control _POSIX_signals_Ualarm_timer;
51
52extern Thread_queue_Control _POSIX_signals_Wait_queue;
53
54extern Chain_Control _POSIX_signals_Inactive_siginfo;
55
56extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
57
58/*
59 *  POSIX internal siginfo structure
60 */
61
62typedef struct {
63  Chain_Node  Node;
64  siginfo_t   Info;
65}  POSIX_signals_Siginfo_node;
66
67/*
68 *  Internal routines
69 */
70
71void _POSIX_signals_Manager_Initialization(void);
72
73void _POSIX_signals_Post_switch_extension(
74  Thread_Control  *the_thread
75);
76
77bool _POSIX_signals_Unblock_thread(
78  Thread_Control  *the_thread,
79  int              signo,
80  siginfo_t       *info
81);
82
83bool _POSIX_signals_Check_signal(
84  POSIX_API_Control  *api,
85  int                 signo,
86  bool                is_global
87);
88
89bool _POSIX_signals_Clear_signals(
90  POSIX_API_Control  *api,
91  int                 signo,
92  siginfo_t          *info,
93  bool                is_global,
94  bool                check_blocked
95);
96
97int killinfo(
98  pid_t               pid,
99  int                 sig,
100  const union sigval *value
101);
102
103void _POSIX_signals_Set_process_signals(
104  sigset_t   mask
105);
106
107void _POSIX_signals_Clear_process_signals(
108  int        signo
109);
110
111/*
112 *  Default signal handlers
113 */
114
115#define _POSIX_signals_Stop_handler NULL
116#define _POSIX_signals_Continue_handler NULL
117
118void _POSIX_signals_Abnormal_termination_handler( int signo );
119
120#endif
121/* end of file */
Note: See TracBrowser for help on using the repository browser.