[PATCH 4/5] posix: Add and use <rtems/posix/psignalimpl.h>

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Dec 3 11:54:10 UTC 2012


This file contains the parts of <rtems/posix/psignal.h> that are only
necessary for the POSIX API implementation.
---
 cpukit/posix/Makefile.am                       |    1 +
 cpukit/posix/include/rtems/posix/psignal.h     |   92 +-------------------
 cpukit/posix/include/rtems/posix/psignalimpl.h |  113 ++++++++++++++++++++++++
 cpukit/posix/preinstall.am                     |    4 +
 cpukit/posix/src/alarm.c                       |    2 +-
 cpukit/posix/src/kill.c                        |    2 +-
 cpukit/posix/src/kill_r.c                      |    2 +-
 cpukit/posix/src/killinfo.c                    |    2 +-
 cpukit/posix/src/pause.c                       |    8 +--
 cpukit/posix/src/psignal.c                     |    2 +-
 cpukit/posix/src/psignalchecksignal.c          |    2 +-
 cpukit/posix/src/psignalclearprocesssignals.c  |    2 +-
 cpukit/posix/src/psignalclearsignals.c         |    2 +-
 cpukit/posix/src/psignalsetprocesssignals.c    |    2 +-
 cpukit/posix/src/psignalunblockthread.c        |    2 +-
 cpukit/posix/src/pthread.c                     |    2 +-
 cpukit/posix/src/pthreadinitthreads.c          |    1 -
 cpukit/posix/src/pthreadkill.c                 |    2 +-
 cpukit/posix/src/pthreadsigmask.c              |    2 +-
 cpukit/posix/src/ptimer.c                      |    1 -
 cpukit/posix/src/sigaction.c                   |    2 +-
 cpukit/posix/src/sigpending.c                  |    2 +-
 cpukit/posix/src/sigqueue.c                    |    2 +-
 cpukit/posix/src/sigsuspend.c                  |    7 +--
 cpukit/posix/src/sigtimedwait.c                |    2 +-
 cpukit/posix/src/sigwait.c                     |    6 +-
 cpukit/posix/src/sigwaitinfo.c                 |    6 +-
 cpukit/posix/src/timercreate.c                 |    2 +-
 cpukit/posix/src/ualarm.c                      |    2 +-
 cpukit/sapi/include/confdefs.h                 |    1 +
 testsuites/psxtests/psxsignal05/init.c         |    4 +-
 31 files changed, 148 insertions(+), 134 deletions(-)
 create mode 100644 cpukit/posix/include/rtems/posix/psignalimpl.h

diff --git a/cpukit/posix/Makefile.am b/cpukit/posix/Makefile.am
index 5f1c00f..78ea3f5 100644
--- a/cpukit/posix/Makefile.am
+++ b/cpukit/posix/Makefile.am
@@ -34,6 +34,7 @@ include_rtems_posix_HEADERS += include/rtems/posix/mutex.h
 include_rtems_posix_HEADERS += include/rtems/posix/posixapi.h
 include_rtems_posix_HEADERS += include/rtems/posix/priority.h
 include_rtems_posix_HEADERS += include/rtems/posix/psignal.h
+include_rtems_posix_HEADERS += include/rtems/posix/psignalimpl.h
 include_rtems_posix_HEADERS += include/rtems/posix/pthread.h
 include_rtems_posix_HEADERS += include/rtems/posix/ptimer.h
 include_rtems_posix_HEADERS += include/rtems/posix/semaphore.h
diff --git a/cpukit/posix/include/rtems/posix/psignal.h b/cpukit/posix/include/rtems/posix/psignal.h
index c630c1f..604b989 100644
--- a/cpukit/posix/include/rtems/posix/psignal.h
+++ b/cpukit/posix/include/rtems/posix/psignal.h
@@ -16,44 +16,9 @@
 #ifndef _RTEMS_POSIX_PSIGNAL_H
 #define _RTEMS_POSIX_PSIGNAL_H
 
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/sigset.h>
+#include <sys/signal.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 ];
+#include <rtems/score/chain.h>
 
 /*
  *  POSIX internal siginfo structure
@@ -64,58 +29,5 @@ typedef struct {
   siginfo_t   Info;
 }  POSIX_signals_Siginfo_node;
 
-/*
- *  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 */
diff --git a/cpukit/posix/include/rtems/posix/psignalimpl.h b/cpukit/posix/include/rtems/posix/psignalimpl.h
new file mode 100644
index 0000000..e61fe3f
--- /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 */
diff --git a/cpukit/posix/preinstall.am b/cpukit/posix/preinstall.am
index 119790b..a9f6ebb 100644
--- a/cpukit/posix/preinstall.am
+++ b/cpukit/posix/preinstall.am
@@ -80,6 +80,10 @@ $(PROJECT_INCLUDE)/rtems/posix/psignal.h: include/rtems/posix/psignal.h $(PROJEC
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/psignal.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/psignal.h
 
+$(PROJECT_INCLUDE)/rtems/posix/psignalimpl.h: include/rtems/posix/psignalimpl.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/psignalimpl.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/psignalimpl.h
+
 $(PROJECT_INCLUDE)/rtems/posix/pthread.h: include/rtems/posix/pthread.h $(PROJECT_INCLUDE)/rtems/posix/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/rtems/posix/pthread.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/rtems/posix/pthread.h
diff --git a/cpukit/posix/src/alarm.c b/cpukit/posix/src/alarm.c
index 32652b1..b3c902c 100644
--- a/cpukit/posix/src/alarm.c
+++ b/cpukit/posix/src/alarm.c
@@ -18,7 +18,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 
 /*
  *  _POSIX_signals_Alarm_TSR
diff --git a/cpukit/posix/src/kill.c b/cpukit/posix/src/kill.c
index b042e30..ee59fe4 100644
--- a/cpukit/posix/src/kill.c
+++ b/cpukit/posix/src/kill.c
@@ -18,7 +18,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 
 int kill(
   pid_t pid,
diff --git a/cpukit/posix/src/kill_r.c b/cpukit/posix/src/kill_r.c
index f2e7c20..301c060 100644
--- a/cpukit/posix/src/kill_r.c
+++ b/cpukit/posix/src/kill_r.c
@@ -18,7 +18,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 
 #if defined(RTEMS_NEWLIB)
 
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index c8b4565..59329ee 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -19,7 +19,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/seterr.h>
 #include <rtems/score/isr.h>
 
diff --git a/cpukit/posix/src/pause.c b/cpukit/posix/src/pause.c
index 10fa8b5..3a307d6 100644
--- a/cpukit/posix/src/pause.c
+++ b/cpukit/posix/src/pause.c
@@ -13,13 +13,9 @@
 #include "config.h"
 #endif
 
-#include <pthread.h>
+#include <stddef.h>
 #include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <unistd.h>
 
 /*
  *  3.4.2 Suspend Process Execution, P1003.1b-1993, p. 81
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index 6d63b29..aa76d0d 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -28,7 +28,7 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/time.h>
 #include <stdio.h>
diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c
index 46c0c85..171d7c8 100644
--- a/cpukit/posix/src/psignalchecksignal.c
+++ b/cpukit/posix/src/psignalchecksignal.c
@@ -26,7 +26,7 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/time.h>
 #include <stdio.h>
diff --git a/cpukit/posix/src/psignalclearprocesssignals.c b/cpukit/posix/src/psignalclearprocesssignals.c
index 491f1fa..3c3cdf4 100644
--- a/cpukit/posix/src/psignalclearprocesssignals.c
+++ b/cpukit/posix/src/psignalclearprocesssignals.c
@@ -22,7 +22,7 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/time.h>
 #include <stdio.h>
diff --git a/cpukit/posix/src/psignalclearsignals.c b/cpukit/posix/src/psignalclearsignals.c
index 01f2399..390bcd1 100644
--- a/cpukit/posix/src/psignalclearsignals.c
+++ b/cpukit/posix/src/psignalclearsignals.c
@@ -22,7 +22,7 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/time.h>
 #include <stdio.h>
diff --git a/cpukit/posix/src/psignalsetprocesssignals.c b/cpukit/posix/src/psignalsetprocesssignals.c
index a6fa6ef..22609bf 100644
--- a/cpukit/posix/src/psignalsetprocesssignals.c
+++ b/cpukit/posix/src/psignalsetprocesssignals.c
@@ -22,7 +22,7 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/time.h>
 #include <stdio.h>
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
index 025ce96..5dc6ef5 100644
--- a/cpukit/posix/src/psignalunblockthread.c
+++ b/cpukit/posix/src/psignalunblockthread.c
@@ -22,7 +22,7 @@
 #include <rtems/score/wkspace.h>
 #include <rtems/seterr.h>
 #include <rtems/posix/threadsup.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/time.h>
 #include <stdio.h>
diff --git a/cpukit/posix/src/pthread.c b/cpukit/posix/src/pthread.c
index e6f9289..8923aeb 100644
--- a/cpukit/posix/src/pthread.c
+++ b/cpukit/posix/src/pthread.c
@@ -25,7 +25,7 @@
 #include <rtems/posix/cancel.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/priority.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/config.h>
 #include <rtems/posix/key.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/pthreadinitthreads.c b/cpukit/posix/src/pthreadinitthreads.c
index 06b859b..b2c850f 100644
--- a/cpukit/posix/src/pthreadinitthreads.c
+++ b/cpukit/posix/src/pthreadinitthreads.c
@@ -24,7 +24,6 @@
 #include <rtems/posix/cancel.h>
 #include <rtems/posix/pthread.h>
 #include <rtems/posix/priority.h>
-#include <rtems/posix/psignal.h>
 #include <rtems/posix/config.h>
 #include <rtems/posix/key.h>
 #include <rtems/posix/time.h>
diff --git a/cpukit/posix/src/pthreadkill.c b/cpukit/posix/src/pthreadkill.c
index ede2d99..0caaa2a 100644
--- a/cpukit/posix/src/pthreadkill.c
+++ b/cpukit/posix/src/pthreadkill.c
@@ -19,7 +19,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/score/isr.h>
 #include <rtems/seterr.h>
 
diff --git a/cpukit/posix/src/pthreadsigmask.c b/cpukit/posix/src/pthreadsigmask.c
index 90b174e..b424dab 100644
--- a/cpukit/posix/src/pthreadsigmask.c
+++ b/cpukit/posix/src/pthreadsigmask.c
@@ -21,7 +21,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/seterr.h>
 
 int pthread_sigmask(
diff --git a/cpukit/posix/src/ptimer.c b/cpukit/posix/src/ptimer.c
index 178ec5e..2e35267 100644
--- a/cpukit/posix/src/ptimer.c
+++ b/cpukit/posix/src/ptimer.c
@@ -32,7 +32,6 @@
 #include <rtems/rtems/types.h>
 #include <rtems/rtems/timer.h>
 #include <rtems/rtems/clock.h>
-#include <rtems/posix/psignal.h>
 #include <rtems/score/wkspace.h>
 #include <pthread.h>
 #include <stdio.h>
diff --git a/cpukit/posix/src/sigaction.c b/cpukit/posix/src/sigaction.c
index f372980..9fb04a0 100644
--- a/cpukit/posix/src/sigaction.c
+++ b/cpukit/posix/src/sigaction.c
@@ -19,7 +19,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/seterr.h>
 #include <rtems/score/isr.h>
 
diff --git a/cpukit/posix/src/sigpending.c b/cpukit/posix/src/sigpending.c
index 58e41d3..9145c98 100644
--- a/cpukit/posix/src/sigpending.c
+++ b/cpukit/posix/src/sigpending.c
@@ -18,7 +18,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/seterr.h>
 
 int sigpending(
diff --git a/cpukit/posix/src/sigqueue.c b/cpukit/posix/src/sigqueue.c
index 0b26eac..b1f6cee 100644
--- a/cpukit/posix/src/sigqueue.c
+++ b/cpukit/posix/src/sigqueue.c
@@ -18,7 +18,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 
 int sigqueue(
   pid_t               pid,
diff --git a/cpukit/posix/src/sigsuspend.c b/cpukit/posix/src/sigsuspend.c
index 6ef961e..f84d11f 100644
--- a/cpukit/posix/src/sigsuspend.c
+++ b/cpukit/posix/src/sigsuspend.c
@@ -13,13 +13,11 @@
 #include "config.h"
 #endif
 
+#include <stddef.h>
 #include <assert.h>
 #include <signal.h>
 #include <errno.h>
 
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
 #include <rtems/seterr.h>
 
 int sigsuspend(
@@ -29,9 +27,6 @@ int sigsuspend(
   sigset_t            saved_signals_blocked;
   sigset_t            current_unblocked_signals;
   int                 status;
-  POSIX_API_Control  *api;
-
-  api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
 
   /*
    *  We use SIG_BLOCK and not SIG_SETMASK because there may be
diff --git a/cpukit/posix/src/sigtimedwait.c b/cpukit/posix/src/sigtimedwait.c
index fc8cc9c..1f23356 100644
--- a/cpukit/posix/src/sigtimedwait.c
+++ b/cpukit/posix/src/sigtimedwait.c
@@ -19,7 +19,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/seterr.h>
 #include <rtems/posix/time.h>
 #include <rtems/score/isr.h>
diff --git a/cpukit/posix/src/sigwait.c b/cpukit/posix/src/sigwait.c
index 5a73e85..cfb7330 100644
--- a/cpukit/posix/src/sigwait.c
+++ b/cpukit/posix/src/sigwait.c
@@ -15,14 +15,10 @@
 #include "config.h"
 #endif
 
-#include <pthread.h>
+#include <stddef.h>
 #include <signal.h>
 #include <errno.h>
 
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
-
 int sigwait(
   const sigset_t  *set,
   int             *sig
diff --git a/cpukit/posix/src/sigwaitinfo.c b/cpukit/posix/src/sigwaitinfo.c
index e90125e..0b2045b 100644
--- a/cpukit/posix/src/sigwaitinfo.c
+++ b/cpukit/posix/src/sigwaitinfo.c
@@ -15,12 +15,8 @@
 #include "config.h"
 #endif
 
+#include <stddef.h>
 #include <signal.h>
-#include <errno.h>
-
-#include <rtems/system.h>
-#include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
 
 int sigwaitinfo(
   const sigset_t  *set,
diff --git a/cpukit/posix/src/timercreate.c b/cpukit/posix/src/timercreate.c
index 86981ea..6dfa75b 100644
--- a/cpukit/posix/src/timercreate.c
+++ b/cpukit/posix/src/timercreate.c
@@ -20,7 +20,7 @@
 #include <rtems/system.h>
 #include <rtems/seterr.h>
 #include <rtems/score/thread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/sigset.h>
 #include <rtems/posix/time.h>
 #include <rtems/posix/timer.h>
 
diff --git a/cpukit/posix/src/ualarm.c b/cpukit/posix/src/ualarm.c
index 0e13908..2a2f975 100644
--- a/cpukit/posix/src/ualarm.c
+++ b/cpukit/posix/src/ualarm.c
@@ -18,7 +18,7 @@
 
 #include <rtems/system.h>
 #include <rtems/posix/pthread.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 #include <rtems/posix/time.h>
 
 /*
diff --git a/cpukit/sapi/include/confdefs.h b/cpukit/sapi/include/confdefs.h
index cddfccb..3939cf1 100644
--- a/cpukit/sapi/include/confdefs.h
+++ b/cpukit/sapi/include/confdefs.h
@@ -1651,6 +1651,7 @@ rtems_fs_init_functions_t    rtems_fs_init_helper =
   #include <rtems/posix/mutex.h>
   #include <rtems/posix/key.h>
   #include <rtems/posix/psignal.h>
+  #include <rtems/posix/pthread.h>
   #include <rtems/posix/rwlock.h>
   #include <rtems/posix/semaphore.h>
   #include <rtems/posix/spinlock.h>
diff --git a/testsuites/psxtests/psxsignal05/init.c b/testsuites/psxtests/psxsignal05/init.c
index 1556a94..04c7879 100644
--- a/testsuites/psxtests/psxsignal05/init.c
+++ b/testsuites/psxtests/psxsignal05/init.c
@@ -11,6 +11,8 @@
 #include "config.h"
 #endif
 
+#define __RTEMS_VIOLATE_KERNEL_VISIBILITY__
+
 #define TEST_NAME                "05"
 #define TEST_STRING              "User Signals"
 #define SIGNAL_ONE               SIGUSR1
@@ -20,7 +22,7 @@
 #include <signal.h>
 #include <errno.h>
 #include <errno.h>
-#include <rtems/posix/psignal.h>
+#include <rtems/posix/psignalimpl.h>
 
 /* forward declarations to avoid warnings */
 void *POSIX_Init(void *argument);
-- 
1.7.7




More information about the devel mailing list