forked from Imagelibrary/rtems
2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* psx05/init.c, psx05/psx05.scn: Add test for bad mutex type.
This commit is contained in:
@@ -295,6 +295,15 @@ void *POSIX_Init(
|
||||
status = pthread_mutex_init( &Mutex_id, &attr );
|
||||
assert( status == EINVAL );
|
||||
|
||||
/* bad kind */
|
||||
status = pthread_mutexattr_init( &attr );
|
||||
assert( !status );
|
||||
|
||||
puts( "Init: pthread_mutex_init - EINVAL (invalid type)" );
|
||||
attr.type = -1;
|
||||
status = pthread_mutex_init( &Mutex_id, &attr );
|
||||
assert( status == EINVAL );
|
||||
|
||||
/* now set up for a success pthread_mutex_init */
|
||||
|
||||
puts( "Init: Resetting mutex attributes" );
|
||||
|
||||
Reference in New Issue
Block a user