From 41616f6513596ea067e2578cb0a99a85df4b03a3 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 3 Dec 1998 23:01:22 +0000 Subject: Changed to account for ownership only being tracked when a priority blocking protocol is used. --- c/src/tests/psxtests/psx05/init.c | 8 ++++++++ testsuites/psxtests/psx05/init.c | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/c/src/tests/psxtests/psx05/init.c b/c/src/tests/psxtests/psx05/init.c index 08b059310f..e89286fac8 100644 --- a/c/src/tests/psxtests/psx05/init.c +++ b/c/src/tests/psxtests/psx05/init.c @@ -269,6 +269,14 @@ void *POSIX_Init( status = pthread_mutexattr_init( &attr ); assert( !status ); + /* + * Set the protocol to priority ceiling so the owner check happens + * and the EPERM test (later) will work. + */ + + status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT ); + assert( !status ); + puts( "Init: pthread_mutex_init - SUCCESSFUL" ); status = pthread_mutex_init( &Mutex_id, &attr ); if ( status ) diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c index 08b059310f..e89286fac8 100644 --- a/testsuites/psxtests/psx05/init.c +++ b/testsuites/psxtests/psx05/init.c @@ -269,6 +269,14 @@ void *POSIX_Init( status = pthread_mutexattr_init( &attr ); assert( !status ); + /* + * Set the protocol to priority ceiling so the owner check happens + * and the EPERM test (later) will work. + */ + + status = pthread_mutexattr_setprotocol( &attr, PTHREAD_PRIO_INHERIT ); + assert( !status ); + puts( "Init: pthread_mutex_init - SUCCESSFUL" ); status = pthread_mutex_init( &Mutex_id, &attr ); if ( status ) -- cgit v1.2.3