summaryrefslogtreecommitdiffstats
path: root/c/src/tests/psxtests/psx05/init.c
diff options
context:
space:
mode:
authorMark Johannes <Mark.Johannes@OARcorp.com>1996-08-20 21:41:08 +0000
committerMark Johannes <Mark.Johannes@OARcorp.com>1996-08-20 21:41:08 +0000
commit256a462255b37ca57b77c6727d94c2d7941ce793 (patch)
tree087e450ff9155553015463fcbcc61d620303eb6a /c/src/tests/psxtests/psx05/init.c
parentChanged all EFAULTs to EINVALs (diff)
downloadrtems-256a462255b37ca57b77c6727d94c2d7941ce793.tar.bz2
Added Einval case for mutex not initialized
Diffstat (limited to '')
-rw-r--r--c/src/tests/psxtests/psx05/init.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/c/src/tests/psxtests/psx05/init.c b/c/src/tests/psxtests/psx05/init.c
index 216451948c..ec79d6db37 100644
--- a/c/src/tests/psxtests/psx05/init.c
+++ b/c/src/tests/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 )