From 8798372261ed1df999bc9f4f3f0be0a230480041 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 10 Sep 2019 12:53:31 -0500 Subject: 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. --- testsuites/psxtests/psxsignal01/init.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'testsuites/psxtests/psxsignal01/init.c') 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 ); -- cgit v1.2.3