diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-31 16:16:17 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-07-31 16:16:17 +0000 |
commit | 76e9a52f29c61a2d96e7a45394019d172a408f49 (patch) | |
tree | 9692c9aff595048b610c9a1a288ae92e71e0f920 /testsuites/psxtests/psxrwlock01 | |
parent | 2011-07-31 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-76e9a52f29c61a2d96e7a45394019d172a408f49.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.
Diffstat (limited to 'testsuites/psxtests/psxrwlock01')
-rw-r--r-- | testsuites/psxtests/psxrwlock01/test.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxrwlock01/test.c b/testsuites/psxtests/psxrwlock01/test.c index 57ded9d145..339ac62dc3 100644 --- a/testsuites/psxtests/psxrwlock01/test.c +++ b/testsuites/psxtests/psxrwlock01/test.c @@ -39,6 +39,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 ); @@ -56,6 +61,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 ); |