Ticket #1630: psignalchecksignal.patch
File psignalchecksignal.patch, 1.6 KB (added by Vinu Rajashekhar, on 07/27/10 at 05:30:27) |
---|
-
cpukit/posix/src/psignalchecksignal.c
diff --git a/cpukit/posix/src/psignalchecksignal.c b/cpukit/posix/src/psignalchecksignal.c index 516ba32..93d88e4 100644
a b 19 19 #include <errno.h> 20 20 #include <pthread.h> 21 21 #include <signal.h> 22 #include <string.h> 22 23 23 24 #include <rtems/system.h> 24 25 #include <rtems/score/isr.h> … … bool _POSIX_signals_Check_signal( 46 47 { 47 48 siginfo_t siginfo_struct; 48 49 sigset_t saved_signals_blocked; 50 Thread_Wait_information stored_thread_wait_information; 49 51 50 52 if ( ! _POSIX_signals_Clear_signals( api, signo, &siginfo_struct, 51 53 is_global, true ) ) … … bool _POSIX_signals_Check_signal( 73 75 api->signals_blocked |= _POSIX_signals_Vectors[ signo ].sa_mask; 74 76 75 77 /* 78 * We have to save the blocking information of the current wait queue 79 * because the signal handler may subsequently go on and put the thread 80 * on a wait queue, for its own purposes. 81 */ 82 memcpy( &stored_thread_wait_information, &_Thread_Executing->Wait, 83 sizeof( Thread_Wait_information )); 84 85 /* 76 86 * Here, the signal handler function executes 77 87 */ 78 88 switch ( _POSIX_signals_Vectors[ signo ].sa_flags ) { … … bool _POSIX_signals_Check_signal( 89 99 } 90 100 91 101 /* 102 * Restore the blocking information 103 */ 104 memcpy( &_Thread_Executing->Wait, &stored_thread_wait_information, 105 sizeof( Thread_Wait_information )); 106 107 /* 92 108 * Restore the previous set of blocked signals 93 109 */ 94 110 api->signals_blocked = saved_signals_blocked;