summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/include/rtems/posix/psignalimpl.h
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2012-12-03 11:35:43 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2012-12-05 18:07:05 +0100
commitf9340ed7f43b81e172ebefebbb9fbd558080d1a3 (patch)
treea5ccd69f10430edd1a8bb4361594c509fdbfb08c /cpukit/posix/include/rtems/posix/psignalimpl.h
parentrtems: Add signal post switch extension on the fly (diff)
downloadrtems-f9340ed7f43b81e172ebefebbb9fbd558080d1a3.tar.bz2
posix: Add and use <rtems/posix/psignalimpl.h>
This file contains the parts of <rtems/posix/psignal.h> that are only necessary for the POSIX API implementation.
Diffstat (limited to 'cpukit/posix/include/rtems/posix/psignalimpl.h')
-rw-r--r--cpukit/posix/include/rtems/posix/psignalimpl.h113
1 files changed, 113 insertions, 0 deletions
diff --git a/cpukit/posix/include/rtems/posix/psignalimpl.h b/cpukit/posix/include/rtems/posix/psignalimpl.h
new file mode 100644
index 0000000000..e61fe3f74b
--- /dev/null
+++ b/cpukit/posix/include/rtems/posix/psignalimpl.h
@@ -0,0 +1,113 @@
+/**
+ * @file rtems/posix/psignal.h
+ *
+ * This include file defines internal information about POSIX signals.
+ */
+
+/*
+ * COPYRIGHT (c) 1989-2011.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifndef _RTEMS_POSIX_PSIGNALIMPL_H
+#define _RTEMS_POSIX_PSIGNALIMPL_H
+
+#include <rtems/posix/psignal.h>
+#include <rtems/posix/pthread.h>
+#include <rtems/posix/sigset.h>
+
+#define _States_Is_interruptible_signal( _states ) \
+ ( ((_states) & \
+ (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL)) == \
+ (STATES_WAITING_FOR_SIGNAL|STATES_INTERRUPTIBLE_BY_SIGNAL))
+
+#define SIGACTION_TERMINATE \
+ { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Abnormal_termination_handler} }
+#define SIGACTION_IGNORE \
+ { 0, SIGNAL_ALL_MASK, {SIG_IGN} }
+#define SIGACTION_STOP \
+ { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Stop_handler} }
+#define SIGACTION_CONTINUE \
+ { 0, SIGNAL_ALL_MASK, {_POSIX_signals_Continue_handler} }
+
+#define SIG_ARRAY_MAX (SIGRTMAX + 1)
+
+/*
+ * Variables
+ */
+
+extern sigset_t _POSIX_signals_Pending;
+
+extern const struct sigaction _POSIX_signals_Default_vectors[ SIG_ARRAY_MAX ];
+
+extern struct sigaction _POSIX_signals_Vectors[ SIG_ARRAY_MAX ];
+
+extern Watchdog_Control _POSIX_signals_Alarm_timer;
+
+extern Watchdog_Control _POSIX_signals_Ualarm_timer;
+
+extern Thread_queue_Control _POSIX_signals_Wait_queue;
+
+extern Chain_Control _POSIX_signals_Inactive_siginfo;
+
+extern Chain_Control _POSIX_signals_Siginfo[ SIG_ARRAY_MAX ];
+
+/*
+ * Internal routines
+ */
+
+void _POSIX_signals_Manager_Initialization(void);
+
+void _POSIX_signals_Post_switch_extension(
+ Thread_Control *the_thread
+);
+
+bool _POSIX_signals_Unblock_thread(
+ Thread_Control *the_thread,
+ int signo,
+ siginfo_t *info
+);
+
+bool _POSIX_signals_Check_signal(
+ POSIX_API_Control *api,
+ int signo,
+ bool is_global
+);
+
+bool _POSIX_signals_Clear_signals(
+ POSIX_API_Control *api,
+ int signo,
+ siginfo_t *info,
+ bool is_global,
+ bool check_blocked
+);
+
+int killinfo(
+ pid_t pid,
+ int sig,
+ const union sigval *value
+);
+
+void _POSIX_signals_Set_process_signals(
+ sigset_t mask
+);
+
+void _POSIX_signals_Clear_process_signals(
+ int signo
+);
+
+/*
+ * Default signal handlers
+ */
+
+#define _POSIX_signals_Stop_handler NULL
+#define _POSIX_signals_Continue_handler NULL
+
+void _POSIX_signals_Abnormal_termination_handler( int signo );
+
+#endif
+/* end of file */