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:
Joel Sherrill
2009-07-04 20:26:18 +00:00
parent e660f86feb
commit c6dc6db074
3 changed files with 22 additions and 0 deletions

View File

@@ -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.

View File

@@ -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 ***

View File

@@ -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 ***" );