diff options
Diffstat (limited to 'testsuites/psxtests/psx05')
-rw-r--r-- | testsuites/psxtests/psx05/init.c | 18 | ||||
-rw-r--r-- | testsuites/psxtests/psx05/psx05.scn | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c index 4456516d18..a36dc9240a 100644 --- a/testsuites/psxtests/psx05/init.c +++ b/testsuites/psxtests/psx05/init.c @@ -651,6 +651,24 @@ void *POSIX_Init( printf( "status = %d\n", status ); assert( status == EINVAL ); + /* mutexinit.c: Initialising recursive mutex */ + + puts( "Init: Recursive Mutex" ); + + status = pthread_mutex_destroy( &Mutex2_id ); + if( status ) + printf( "status mutex destroy:%d\n", status ); + + status = pthread_mutexattr_init( &attr ); + if( status ) + printf( "status mutexattr:%d\n", status ); + + attr.recursive=true; + status = pthread_mutex_init( &Mutex2_id, &attr ); + if ( status ) + printf( "status recursive mutex :%d\n", status ); + assert( !status ); + puts( "*** END OF POSIX TEST 5 ***" ); rtems_test_exit( 0 ); diff --git a/testsuites/psxtests/psx05/psx05.scn b/testsuites/psxtests/psx05/psx05.scn index a9d11a66e3..58351cccd7 100644 --- a/testsuites/psxtests/psx05/psx05.scn +++ b/testsuites/psxtests/psx05/psx05.scn @@ -114,4 +114,5 @@ Task 3: exit Init: pthread_mutex_getprioceiling- ceiling = 200 Init: pthread_setschedparam - set Init priority to highest Init: pthread_mutex_lock - EINVAL (priority ceiling violation) +Init: Recursive Mutex *** END OF POSIX TEST 5 *** |