diff options
author | Joel Sherrill <joel@rtems.org> | 2019-09-10 12:53:31 -0500 |
---|---|---|
committer | Joel Sherrill <joel@rtems.org> | 2019-09-24 16:27:57 -0500 |
commit | 8798372261ed1df999bc9f4f3f0be0a230480041 (patch) | |
tree | 0762d89609e1bb4717335838f56b254fdaaba2e9 /testsuites/psxtests/psxsignal01/init.c | |
parent | rtems: Add rtems_interrupt_server_entry_move() (diff) | |
download | rtems-8798372261ed1df999bc9f4f3f0be0a230480041.tar.bz2 |
Correct initial POSIX signals mask
+ Modify POSIX thread create extension to ensure expected
initial signal mask is provided to system threads, initial
tasks and threads, and inheritied by tasks and threads.
+ Adds psxsignal07 to verify functionality when using a POSIX
Initialization thread and POSIX threads.
+ Adds psxsignal08 to verify functionality when using a Classic API
Initialization task and Classic API tasks.
Closes #3794.
Diffstat (limited to 'testsuites/psxtests/psxsignal01/init.c')
-rw-r--r-- | testsuites/psxtests/psxsignal01/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxsignal01/init.c b/testsuites/psxtests/psxsignal01/init.c index 511dd2d637..6df3695c98 100644 --- a/testsuites/psxtests/psxsignal01/init.c +++ b/testsuites/psxtests/psxsignal01/init.c @@ -36,6 +36,18 @@ extern void _POSIX_signals_Abnormal_termination_handler( int signo ); volatile int Signal_occurred; volatile int Signal_count; +static void block_all_signals(void) +{ + int sc; + sigset_t mask; + + sc = sigfillset( &mask ); + rtems_test_assert( !sc ); + + sc = pthread_sigmask( SIG_BLOCK, &mask, NULL ); + rtems_test_assert( !sc ); +} + void Handler_1( int signo ) @@ -108,6 +120,8 @@ void *POSIX_Init( TEST_BEGIN(); + block_all_signals(); + /* set the time of day, and print our buffer in multiple ways */ set_time( TM_FRIDAY, TM_MAY, 24, 96, 11, 5, 0 ); |