forked from Imagelibrary/rtems
2009-05-17 Joel Sherrill <joel.sherrill@oarcorp.com>
* psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for NULL attribute pointer on init.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2009-05-17 Joel Sherrill <joel.sherrill@oarcorp.com>
|
||||||
|
|
||||||
|
* psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for
|
||||||
|
NULL attribute pointer on init.
|
||||||
|
|
||||||
2009-05-17 Joel Sherrill <joel.sherrill@OARcorp.com>
|
2009-05-17 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||||
|
|
||||||
* psxsem01/Makefile.am, psxsem01/init.c, psxsem01/psxsem01.scn,
|
* psxsem01/Makefile.am, psxsem01/init.c, psxsem01/psxsem01.scn,
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ pthread_rwlockattr_init( &attr ) -- OK
|
|||||||
pthread_rwlock_init( &rwlock, &attr ) -- OK
|
pthread_rwlock_init( &rwlock, &attr ) -- OK
|
||||||
pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN
|
pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN
|
||||||
pthread_rwlock_destroy( &rwlock ) -- OK
|
pthread_rwlock_destroy( &rwlock ) -- OK
|
||||||
|
pthread_rwlock_init( &rwlock, NULL ) -- OK
|
||||||
|
pthread_rwlock_destroy( &rwlock ) -- OK
|
||||||
pthread_rwlock_init( &RWLock, &attr ) -- OK
|
pthread_rwlock_init( &RWLock, &attr ) -- OK
|
||||||
pthread_rwlock_tryrdlock(RWLock) -- OK
|
pthread_rwlock_tryrdlock(RWLock) -- OK
|
||||||
Init: pthread_create - thread 1 OK
|
Init: pthread_create - thread 1 OK
|
||||||
|
|||||||
@@ -274,6 +274,15 @@ int main(
|
|||||||
status = pthread_rwlock_destroy( &rwlock );
|
status = pthread_rwlock_destroy( &rwlock );
|
||||||
assert( status == 0 );
|
assert( status == 0 );
|
||||||
|
|
||||||
|
/********* CREATE RWLOCK WITH DEFAULT ATTRIBUTES AND DESTROY IT *********/
|
||||||
|
puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
|
||||||
|
status = pthread_rwlock_init( &rwlock, NULL );
|
||||||
|
assert( status == 0 );
|
||||||
|
|
||||||
|
puts( "pthread_rwlock_destroy( &rwlock ) -- OK" );
|
||||||
|
status = pthread_rwlock_destroy( &rwlock );
|
||||||
|
assert( status == 0 );
|
||||||
|
|
||||||
/*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
|
/*************** CREATE THREADS AND LET THEM OBTAIN READLOCK ***************/
|
||||||
puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
|
puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
|
||||||
status = pthread_rwlock_init( &RWLock, &attr );
|
status = pthread_rwlock_init( &RWLock, &attr );
|
||||||
|
|||||||
Reference in New Issue
Block a user