From 2fcea4c47325578d887d2c061a86e5e178d7a32a Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 17 Oct 2017 10:06:08 +0200 Subject: posix: Fix _POSIX_Threads_Create_extension() The thread POSIX API control must be fully initialized in _POSIX_Threads_Create_extension(), otherwise a pthread_setschedparam() is broken for all threads not created with pthread_create(). --- testsuites/psxtests/psxclassic01/init.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'testsuites') diff --git a/testsuites/psxtests/psxclassic01/init.c b/testsuites/psxtests/psxclassic01/init.c index 924224c7b7..1acc14142a 100644 --- a/testsuites/psxtests/psxclassic01/init.c +++ b/testsuites/psxtests/psxclassic01/init.c @@ -52,9 +52,17 @@ rtems_task test_task(rtems_task_argument arg) int sc; struct sigaction new_action; sigset_t mask; + int policy; + struct sched_param param; printf("test_task starting...\n"); + sc = pthread_getschedparam( pthread_self(), &policy, ¶m ); + rtems_test_assert( sc == 0 ); + + sc = pthread_setschedparam( pthread_self(), policy, ¶m ); + rtems_test_assert( sc == 0 ); + sc = sigemptyset (&new_action.sa_mask); rtems_test_assert( sc == 0 ); -- cgit v1.2.3