forked from Imagelibrary/rtems
2009-07-04 Santosh G Vattam <vattam.santosh@gmail.com>
* psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for obtaining an rwlock and then releasing it twice.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2009-07-04 Santosh G Vattam <vattam.santosh@gmail.com>
|
||||
|
||||
* psxrwlock01/psxrwlock01.scn, psxrwlock01/test.c: Add test case for
|
||||
obtaining an rwlock and then releasing it twice.
|
||||
|
||||
2009-07-03 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* psxenosys/init.c, psxenosys/psxenosys.scn: Add test of vfork stub.
|
||||
|
||||
@@ -79,4 +79,7 @@ pthread_rwlock_timedwrlock( &RWLock, &abstime) -- ETIMEDOUT
|
||||
pthread_rwlock_timedrdlock( &RWLock, &abstime) -- in past -- OK
|
||||
pthread_rwlock_timedwrlock( &RWLock, &abstime) -- in past -- OK
|
||||
pthread_rwlock_destroy( &RWLock ) -- OK
|
||||
pthread_rwlock_init( &rwlock, NULL ) -- OK
|
||||
pthread_rwlock_unlock ( &rwlock ) -- OK
|
||||
pthread_rwlock_unlock ( &rwlock ) -- OK
|
||||
*** END OF POSIX RWLOCK TEST 01 ***
|
||||
|
||||
@@ -407,6 +407,20 @@ int main(
|
||||
status = pthread_rwlock_destroy( &RWLock );
|
||||
assert( status == 0 );
|
||||
|
||||
/*************** OBTAIN A LOCK AND THEN RELEASE IT TWICE ***************/
|
||||
|
||||
puts( "pthread_rwlock_init( &rwlock, NULL ) -- OK" );
|
||||
status = pthread_rwlock_init( &rwlock, NULL );
|
||||
assert( status == 0 );
|
||||
assert( rwlock != 0 );
|
||||
|
||||
puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
|
||||
status = pthread_rwlock_unlock( &rwlock );
|
||||
assert( status == 0 );
|
||||
|
||||
puts( "pthread_rwlock_unlock ( &rwlock ) -- OK" );
|
||||
status = pthread_rwlock_unlock( &rwlock );
|
||||
assert( status == 0 );
|
||||
|
||||
/*************** END OF TEST *****************/
|
||||
puts( "*** END OF POSIX RWLOCK TEST 01 ***" );
|
||||
|
||||
Reference in New Issue
Block a user