summaryrefslogtreecommitdiffstats
path: root/testsuites
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-17 10:06:08 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2017-10-17 10:12:10 +0200
commit2fcea4c47325578d887d2c061a86e5e178d7a32a (patch)
treef779f8268a4a25365d4509ba082ab9f1204b2c2b /testsuites
parentscore: Rename _Watchdog_Per_CPU_insert_monotonic() (diff)
downloadrtems-2fcea4c47325578d887d2c061a86e5e178d7a32a.tar.bz2
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().
Diffstat (limited to 'testsuites')
-rw-r--r--testsuites/psxtests/psxclassic01/init.c8
1 files changed, 8 insertions, 0 deletions
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, &param );
+ rtems_test_assert( sc == 0 );
+
+ sc = pthread_setschedparam( pthread_self(), policy, &param );
+ rtems_test_assert( sc == 0 );
+
sc = sigemptyset (&new_action.sa_mask);
rtems_test_assert( sc == 0 );