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/psxsignal02 | |
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/psxsignal02')
-rw-r--r-- | testsuites/psxtests/psxsignal02/init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxsignal02/init.c b/testsuites/psxtests/psxsignal02/init.c index 1f9afc9fca..c7a9432415 100644 --- a/testsuites/psxtests/psxsignal02/init.c +++ b/testsuites/psxtests/psxsignal02/init.c @@ -28,6 +28,18 @@ void Install_Signal_Handler(const char *task_name); volatile bool Signal_occurred; volatile pthread_t Signal_thread; +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 Signal_handler( int signo ) @@ -140,6 +152,8 @@ void *POSIX_Init( Signal_occurred = false; + block_all_signals(); + act.sa_handler = Signal_handler; act.sa_flags = 0; sigaction( SIGUSR1, &act, NULL ); |