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:
@@ -1,3 +1,7 @@
|
||||
2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* psx05/init.c, psx05/psx05.scn: Add test for bad mutex type.
|
||||
|
||||
2009-10-11 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||
|
||||
* psxcleanup/system.h: Fix typo.
|
||||
|
||||
@@ -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" );
|
||||
|
||||
@@ -36,6 +36,7 @@ Init: pthread_mutex_init - EINVAL (bad priority ceiling)
|
||||
Init: Resetting mutex attributes
|
||||
Init: pthread_mutex_init - ENOSYS (process wide scope)
|
||||
Init: pthread_mutex_init - EINVAL (invalid scope)
|
||||
Init: pthread_mutex_init - EINVAL (invalid type)
|
||||
Init: Resetting mutex attributes
|
||||
Init: Changing mutex attributes
|
||||
Init: mutex protocol is (1) -- PTHREAD_PRIO_INHERIT
|
||||
|
||||
Reference in New Issue
Block a user