RTEMS CPU Kit with SuperCore  4.11.3
psignalimpl.h
Go to the documentation of this file.
1 
9 /*
10  * COPYRIGHT (c) 1989-2013.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  */
17 
18 #ifndef _RTEMS_POSIX_PSIGNALIMPL_H
19 #define _RTEMS_POSIX_PSIGNALIMPL_H
20 
31 #include <rtems/posix/psignal.h>
32 #include <rtems/posix/pthread.h>
33 #include <rtems/posix/sigset.h>
34 #include <rtems/score/apiext.h>
35 #include <rtems/score/isrlock.h>
36 #include <rtems/score/percpu.h>
38 
39 #define _States_Is_interruptible_signal( _states ) \
40  ( ((_states) & \
41  (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
42  (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
43 
44 #define SIGACTION_TERMINATE \
45  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abnormal_termination_handler} }
46 #define SIGACTION_IGNORE \
47  { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
48 #define SIGACTION_STOP \
49  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
50 #define SIGACTION_CONTINUE \
51  { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
52 
53 #define SIG_ARRAY_MAX (SIGRTMAX + 1)
54 
55 /*
56  * Variables
57  */
58 
59 extern sigset_t _POSIX_signals_Pending;
60 
61 extern const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
62 
63 extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
64 
65 extern Thread_queue_Control _POSIX_signals_Wait_queue;
66 
67 extern Chain_Control _POSIX_signals_Inactive_siginfo;
68 
69 extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
70 
71 /*
72  * Internal routines
73  */
74 
79 
80 #define _POSIX_signals_Acquire( lock_context ) \
81  _Thread_queue_Acquire( &_POSIX_signals_Wait_queue, lock_context )
82 
83 #define _POSIX_signals_Release( lock_context ) \
84  _Thread_queue_Release( &_POSIX_signals_Wait_queue, lock_context )
85 
86 void _POSIX_signals_Action_handler(
87  Thread_Control *executing,
88  Thread_Action *action,
89  Per_CPU_Control *cpu,
90  ISR_Level level
91 );
92 
97  Thread_Control *the_thread,
98  int signo,
99  siginfo_t *info
100 );
101 
106  POSIX_API_Control *api,
107  int signo,
108  bool is_global
109 );
110 
115  POSIX_API_Control *api,
116  int signo,
117  siginfo_t *info,
118  bool is_global,
119  bool check_blocked,
120  bool do_signals_acquire_release
121 );
122 
123 int killinfo(
124  pid_t pid,
125  int sig,
126  const union sigval *value
127 );
128 
133  sigset_t mask
134 );
135 
136 void _POSIX_signals_Clear_process_signals(
137  int signo
138 );
139 
140 /*
141  * Default signal handlers
142  */
143 
144 #define _POSIX_signals_Stop_handler NULL
145 #define _POSIX_signals_Continue_handler NULL
146 
147 void _POSIX_signals_Abnormal_termination_handler( int signo );
148 
151 #endif
152 /* end of file */
bool _POSIX_signals_Unblock_thread(Thread_Control *the_thread, int signo, siginfo_t *info)
Unlock POSIX signals thread.
Definition: psignalunblockthread.c:49
This is used to manage a chain.
Definition: chain.h:83
POSIX Threads Private Support.
This is the structure used to manage sets of tasks which are blocked waiting to acquire a resource...
Definition: threadq.h:171
void _POSIX_signals_Manager_Initialization(void)
POSIX signals manager initialization.
Definition: psignal.c:170
Internal Information about POSIX Signals.
This include file defines the per CPU information required by RTEMS.
bool _POSIX_signals_Check_signal(POSIX_API_Control *api, int signo, bool is_global)
Check POSIX signal.
Definition: psignalchecksignal.c:40
uint32_t ISR_Level
The following type defines the control block used to manage the interrupt level portion of the status...
Definition: isrlevel.h:42
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
Per CPU Core Structure.
Definition: percpu.h:233
Thread action.
Definition: thread.h:480
API Extensions Handler.
Constants and Structures Associated with the Manipulation of Objects.
POSIX Signal Sets Management Helper.
This defines the POSIX API support structure associated with each thread in a system with POSIX confi...
Definition: threadsup.h:44
bool _POSIX_signals_Clear_signals(POSIX_API_Control *api, int signo, siginfo_t *info, bool is_global, bool check_blocked, bool do_signals_acquire_release)
Clear POSIX signals.
Definition: psignalclearsignals.c:40
void _POSIX_signals_Set_process_signals(sigset_t mask)
Set POSIX process signals.
Definition: psignalsetprocesssignals.c:36
ISR Locks.