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

4.104.11
Last change on this file since d05ab35 was d05ab35, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 20, 2008 at 9:52:19 PM

2008-11-20 Joel Sherrill <joel.sherrill@…>

  • posix/Makefile.am, posix/include/rtems/posix/psignal.h: Add stubs for gettimer() and setitimer().
  • posix/src/getitimer.c, posix/src/setitimer.c: New files.
  • 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    0xffffffffL
27
28static inline sigset_t signo_to_mask(
29  uint32_t sig
30)
31{
32  return (1 << sig) - 1;
33}
34
35#define is_valid_signo( _sig ) \
36  ((_sig) >= 1 && (_sig) <= 32 )
37
38#define _States_Is_interruptible_signal( _states ) \
39  ( ((_states) & \
40    (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
41      (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
42
43#define SIGACTION_TERMINATE \
44  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abnormal_termination_handler} }
45#define SIGACTION_IGNORE \
46  { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
47#define SIGACTION_STOP \
48  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
49#define SIGACTION_CONTINUE \
50  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
51
52#define SIG_ARRAY_MAX  (SIGRTMAX + 1)
53
54/*
55 *  Variables
56 */
57
58extern sigset_t  _POSIX_signals_Pending;
59
60extern const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
61
62extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
63
64extern Watchdog_Control _POSIX_signals_Alarm_timer;
65
66extern Thread_queue_Control _POSIX_signals_Wait_queue;
67
68extern Chain_Control _POSIX_signals_Inactive_siginfo;
69
70extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
71
72/*
73 *  POSIX internal siginfo structure
74 */
75
76typedef struct {
77  Chain_Node  Node;
78  siginfo_t   Info;
79}  POSIX_signals_Siginfo_node;
80
81/*
82 *  Internal routines
83 */
84
85void _POSIX_signals_Manager_Initialization(
86  int  maximum_queued_signals
87);
88
89void _POSIX_signals_Post_switch_extension(
90  Thread_Control  *the_thread
91);
92
93bool _POSIX_signals_Unblock_thread(
94  Thread_Control  *the_thread,
95  int              signo,
96  siginfo_t       *info
97);
98
99bool _POSIX_signals_Check_signal(
100  POSIX_API_Control  *api,
101  int                 signo,
102  bool                is_global
103);
104
105bool _POSIX_signals_Clear_signals(
106  POSIX_API_Control  *api,
107  int                 signo,
108  siginfo_t          *info,
109  bool                is_global,
110  bool                check_blocked
111);
112
113int killinfo(
114  pid_t               pid,
115  int                 sig,
116  const union sigval *value
117);
118
119void _POSIX_signals_Set_process_signals(
120  sigset_t   mask
121);
122
123void _POSIX_signals_Clear_process_signals(
124  sigset_t   mask
125);
126
127/*
128 *  Default signal handlers
129 */
130
131#define _POSIX_signals_Stop_handler NULL
132#define _POSIX_signals_Continue_handler NULL
133
134void _POSIX_signals_Abnormal_termination_handler( int signo );
135
136#endif
137/* end of file */
Note: See TracBrowser for help on using the repository browser.