From 69ca55c0885c1410c3b25466ef7d862d112583e2 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 6 Jul 2009 17:58:44 +0000 Subject: 2009-07-06 Joel Sherrill * psx07/init.c: Slight test fix to ensure state of sched_param structure. --- testsuites/psxtests/psx07/init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testsuites/psxtests/psx07/init.c') diff --git a/testsuites/psxtests/psx07/init.c b/testsuites/psxtests/psx07/init.c index 8ebe6ca75c..c49ae5c250 100644 --- a/testsuites/psxtests/psx07/init.c +++ b/testsuites/psxtests/psx07/init.c @@ -504,7 +504,9 @@ void *POSIX_Init( status = pthread_setschedparam( pthread_self(), SCHED_OTHER, NULL ); fatal_directive_check_status_only( status, EINVAL, "invalid priority" ); - schedparam.sched_priority = sched_get_priority_max(SCHED_OTHER); + /* reset sched_param */ + status = pthread_getschedparam( pthread_self(), &schedpolicy, &schedparam ); + posix_service_failed( status, "pthread_getschedparam"); puts( "Init: pthread_setschedparam - EINVAL (invalid policy)" ); status = pthread_setschedparam( pthread_self(), -1, &schedparam ); -- cgit v1.2.3