summaryrefslogtreecommitdiff
path: root/PACE/pace/signal.h
blob: c1637b4e25b2f55b41b5a67a991e6439f10c547c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
/* $Id$

 * =============================================================================
 *
 * = LIBRARY
 *    pace
 *
 * = FILENAME
 *    pace/signal.h
 *
 * = AUTHOR
 *    Luther Baker
 *
 * ============================================================================= */

#ifndef PACE_SIGNAL_H
#define PACE_SIGNAL_H

#include "pace/config/defines.h"

#if (PACE_HAS_POSIX)
# include "pace/posix/signal.h"
#elif (PACE_VXWORKS)
# include "pace/vxworks/signal.h"
#elif (PACE_WIN32)
# include "pace/win32/signal.h"
#endif

#if defined (PACE_HAS_CPLUSPLUS)
extern "C" {
#endif /* PACE_HAS_CPLUSPLUS */

  /**
     PACE's implementation of the POSIX function kill.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.2.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_kill (pace_pid_t pid, int sig);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     C std 7.14.2.1
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_raise (int sig);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sigaction.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.4.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigaction (int sig,
                                  const pace_sigaction_s * act,
                                  pace_sigaction_s * oact);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigaddset.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.3.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigaddset (pace_sigset_t * set, int signo);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigemptyset.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.3.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigemptyset (pace_sigset_t * set);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigdelset.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.3.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigdelset (pace_sigset_t * set, int signo);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigfillset.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.3.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigfillset (pace_sigset_t * set);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigismember.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.3.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigismember (const pace_sigset_t * set, int signo);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     C std 7.14.1.1
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE pace_sig_pf pace_signal(int sig, pace_sig_pf func);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sigpending.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.6.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigpending (pace_sigset_t * set);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigprocmask.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.5.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigprocmask (int how,
                                    const pace_sigset_t * set,
                                    pace_sigset_t * oset);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigqueue.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.9.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sigqueue (pace_pid_t pid,
                                 int signo,
                                 const pace_sigval value);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sigsuspend.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.7.
   */
#if (PACE_HAS_POSIX_SIG_UOF)
  PACE_INLINE int pace_sigsuspend (const pace_sigset_t * sigmask);
#endif /* PACE_HAS_POSIX_SIG_UOF */

  /**
     PACE's implementation of the POSIX function sigtimedwait.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.8.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sigtimedwait (const pace_sigset_t * set,
                                     pace_siginfo_t * info,
                                     const pace_timespec * timeout);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

  /**
     PACE's implementation of the POSIX function sigwait.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.8.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sigwait (const pace_sigset_t * set, int * sig);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */
  /* Requires PACE_HAS_POSIX_PTHREAD_SEMANTICS. */

  /**
     PACE's implementation of the POSIX function sigwaitinfo.
     See POSIX standard (Internation Standard ISO/IEC 9945-1:1996;
     IEEE Std 1003.1, 1996 Edition), Section 3.3.8.
   */
#if (PACE_HAS_POSIX_NONUOF_FUNCS)
  PACE_INLINE int pace_sigwaitinfo (const pace_sigset_t * set, pace_siginfo_t * info);
#endif /* PACE_HAS_POSIX_NONUOF_FUNCS */

#if defined (PACE_HAS_INLINE)
#  if (PACE_HAS_POSIX)
#    include "pace/posix/signal.inl"
#  elif (PACE_VXWORKS)
#    include "pace/vxworks/signal.inl"
#  elif (PACE_WIN32)
#    include "pace/win32/signal.inl"
#  endif
#endif /* PACE_HAS_INLINE */

#if defined (PACE_HAS_CPLUSPLUS)
}
#endif /* PACE_HAS_CPLUSPLUS */

#endif /* PACE_SIGNAL_H */