diff options
author | Mark Johannes <Mark.Johannes@OARcorp.com> | 1996-08-20 21:41:08 +0000 |
---|---|---|
committer | Mark Johannes <Mark.Johannes@OARcorp.com> | 1996-08-20 21:41:08 +0000 |
commit | 256a462255b37ca57b77c6727d94c2d7941ce793 (patch) | |
tree | 087e450ff9155553015463fcbcc61d620303eb6a /testsuites/psxtests/psx05/init.c | |
parent | Changed all EFAULTs to EINVALs (diff) | |
download | rtems-256a462255b37ca57b77c6727d94c2d7941ce793.tar.bz2 |
Added Einval case for mutex not initialized
Diffstat (limited to 'testsuites/psxtests/psx05/init.c')
-rw-r--r-- | testsuites/psxtests/psx05/init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuites/psxtests/psx05/init.c b/testsuites/psxtests/psx05/init.c index 216451948c..ec79d6db37 100644 --- a/testsuites/psxtests/psx05/init.c +++ b/testsuites/psxtests/psx05/init.c @@ -224,6 +224,10 @@ void *POSIX_Init( empty_line(); + puts( "Init: pthread_mutex_init - EINVAL (NULL mutex_id)" ); + status = pthread_mutex_init( NULL, &attr ); + assert( status == EINVAL ); + puts( "Init: pthread_mutex_init - EINVAL (not initialized attr)" ); status = pthread_mutex_init( &Mutex_id, &destroyed_attr ); assert( status == EINVAL ); @@ -271,6 +275,12 @@ void *POSIX_Init( printf( "status = %d\n", status ); assert( !status ); + puts( "Init: pthread_mutex_init - EBUSY (attempt to initialize an existing mutex)" ); + status = pthread_mutex_init( &Mutex_id, &attr ); + if ( !status ) + printf( "status = %d\n", status ); + assert( status == EBUSY ); + puts( "Init: pthread_mutex_trylock - EINVAL (illegal ID)" ); status = pthread_mutex_trylock( &Mutex_bad_id ); if ( status != EINVAL ) |