summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxrwlock01/test.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-31 16:16:43 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-07-31 16:16:43 +0000
commit0126591e0ade5fe3a7a237078458c6988091ee46 (patch)
tree991c36f97fbe5bc05eb903947bc496ac76aa7602 /testsuites/psxtests/psxrwlock01/test.c
parent2011-07-31 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff)
downloadrtems-0126591e0ade5fe3a7a237078458c6988091ee46.tar.bz2
2011-07-31 Joel Sherrill <joel.sherrilL@OARcorp.com>
PR 1867/cpukit * Makefile.am, configure.ac, psx12/task.c, psxkey03/init.c, psxrwlock01/test.c: Correct implementation of pthread_exit() and pthread_join() to support the case where a thread is joinable but calls pthread_exit() before a thread has attempted to join. * psx16/.cvsignore, psx16/Makefile.am, psx16/init.c, psx16/psx16.doc, psx16/psx16.scn: New files.
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 af17da1abe..c58b880fb5 100644
--- a/testsuites/psxtests/psxrwlock01/test.c
+++ b/testsuites/psxtests/psxrwlock01/test.c
@@ -35,6 +35,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);
rtems_test_assert( !status );
@@ -52,6 +57,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);
rtems_test_assert( !status );