summaryrefslogtreecommitdiffstats
path: root/cpukit/score
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/score')
-rw-r--r--cpukit/score/cpu/unix/cpu.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/cpukit/score/cpu/unix/cpu.c b/cpukit/score/cpu/unix/cpu.c
index 0e51ce3dae..736b7c4c7f 100644
--- a/cpukit/score/cpu/unix/cpu.c
+++ b/cpukit/score/cpu/unix/cpu.c
@@ -48,26 +48,31 @@ int cpu_number;
* _CPU_ISR_From_CPU_Init
*/
+sigset_t posix_empty_mask;
+
void _CPU_ISR_From_CPU_Init()
{
unsigned32 i;
proc_ptr old_handler;
+ /*
+ * Generate an empty mask to be used by disable_support
+ */
+ sigemptyset(&posix_empty_mask);
+
/*
* Block all the signals except SIGTRAP for the debugger
* and SIGABRT for fatal errors.
*/
- _CPU_ISR_Enable(1);
-
(void) sigfillset(&_CPU_Signal_mask);
(void) sigdelset(&_CPU_Signal_mask, SIGTRAP);
(void) sigdelset(&_CPU_Signal_mask, SIGABRT);
(void) sigdelset(&_CPU_Signal_mask, SIGIOT);
(void) sigdelset(&_CPU_Signal_mask, SIGCONT);
- sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, 0);
+ _CPU_ISR_Enable(1);
/*
* Set the handler for all signals to be signal_handler
@@ -130,11 +135,7 @@ void _CPU_Signal_initialize( void )
sigaction(SIGTTIN, &act, 0);
sigaction(SIGTTOU, &act, 0);
sigaction(SIGURG, &act, 0);
-/*
- * XXX: Really should be on HPUX.
- */
-
-#if defined(hppa1_1)
+#ifdef SIGLOST
sigaction(SIGLOST, &act, 0);
#endif
@@ -491,13 +492,10 @@ void _CPU_Restore_float_context(
unsigned32 _CPU_ISR_Disable_support(void)
{
sigset_t old_mask;
- sigset_t empty_mask;
- sigemptyset(&empty_mask);
- sigemptyset(&old_mask);
sigprocmask(SIG_BLOCK, &_CPU_Signal_mask, &old_mask);
- if (memcmp((char *)&empty_mask, (char *)&old_mask, sizeof(sigset_t)) != 0)
+ if (memcmp((void *)&posix_empty_mask, (void *)&old_mask, sizeof(sigset_t)) != 0)
return 1;
return 0;
@@ -610,6 +608,14 @@ void _CPU_Fatal_error(unsigned32 error)
{
setitimer(ITIMER_REAL, 0, 0);
+ if ( error ) {
+#ifdef RTEMS_DEBUG
+ abort();
+#endif
+ if (getenv("RTEMS_DEBUG"))
+ abort();
+ }
+
_exit(error);
}