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:
Joel Sherrill
2009-05-18 00:39:25 +00:00
parent 7a67dfbc62
commit b7681c6b12
3 changed files with 16 additions and 0 deletions

View File

@@ -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>
* psxsem01/Makefile.am, psxsem01/init.c, psxsem01/psxsem01.scn,

View File

@@ -39,6 +39,8 @@ pthread_rwlockattr_init( &attr ) -- OK
pthread_rwlock_init( &rwlock, &attr ) -- OK
pthread_rwlock_init( &rwlock, &attr ) -- EAGAIN
pthread_rwlock_destroy( &rwlock ) -- OK
pthread_rwlock_init( &rwlock, NULL ) -- OK
pthread_rwlock_destroy( &rwlock ) -- OK
pthread_rwlock_init( &RWLock, &attr ) -- OK
pthread_rwlock_tryrdlock(RWLock) -- OK
Init: pthread_create - thread 1 OK

View File

@@ -274,6 +274,15 @@ int main(
status = pthread_rwlock_destroy( &rwlock );
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 ***************/
puts( "pthread_rwlock_init( &RWLock, &attr ) -- OK" );
status = pthread_rwlock_init( &RWLock, &attr );