summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxrwlock01/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/psxtests/psxrwlock01/test.c')
-rw-r--r--testsuites/psxtests/psxrwlock01/test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c
index 270e512a55..9f9a647abb 100644
--- a/testsuites/psxtests/psxrwlock01/test.c
+++ b/testsuites/psxtests/psxrwlock01/test.c
@@ -30,6 +30,11 @@ void *ReadLockThread(void *arg)
{
int status;
+ /*
+ * Detach ourselves so we don't wait for a join that won't happen.
+ */
+ pthread_detach( pthread_self() );
+
puts( "ReadThread - pthread_rwlock_rdlock(RWLock) blocking -- OK" );
status = pthread_rwlock_rdlock(&RWLock);
assert( !status );
@@ -47,6 +52,11 @@ void *WriteLockThread(void *arg)
{
int status;
+ /*
+ * Detach ourselves so we don't wait for a join that won't happen.
+ */
+ pthread_detach( pthread_self() );
+
puts( "WriteThread - pthread_rwlock_wrlock(RWLock) blocking -- OK" );
status = pthread_rwlock_wrlock(&RWLock);
assert( !status );