summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuites/psxtests/ChangeLog8
-rw-r--r--testsuites/psxtests/Makefile.am3
-rw-r--r--testsuites/psxtests/configure.ac1
-rw-r--r--testsuites/psxtests/psx12/task.c5
-rw-r--r--testsuites/psxtests/psxkey03/init.c5
-rw-r--r--testsuites/psxtests/psxrwlock01/test.c10
6 files changed, 31 insertions, 1 deletions
diff --git a/testsuites/psxtests/ChangeLog b/testsuites/psxtests/ChangeLog
index fe5df182a4..f587e5ca8e 100644
--- a/testsuites/psxtests/ChangeLog
+++ b/testsuites/psxtests/ChangeLog
@@ -1,3 +1,11 @@
+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.
+
2011-07-22 Joel Sherrill <joel.sherrill@oarcorp.com>
PR 1839/filesystem
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index b484b39960..977b7515f2 100644
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -7,7 +7,8 @@ ACLOCAL_AMFLAGS = -I ../aclocal
SUBDIRS = psxclock
if HAS_POSIX
SUBDIRS += psxhdrs psx01 psx02 psx03 psx04 psx05 psx06 psx07 psx08 psx09 \
- psx10 psx11 psx12 psx13 psx14 psx15 psxaio01 psxaio02 psxaio03 \
+ psx10 psx11 psx12 psx13 psx14 psx15 psx16 \
+ psxaio01 psxaio02 psxaio03 \
psxalarm01 psxautoinit01 psxautoinit02 psxbarrier01 \
psxcancel psxcancel01 psxclassic01 psxcleanup psxcleanup01 \
psxcond01 psxenosys psxkey01 psxkey02 psxkey03 \
diff --git a/testsuites/psxtests/configure.ac b/testsuites/psxtests/configure.ac
index 6968635b46..5f33fc751e 100644
--- a/testsuites/psxtests/configure.ac
+++ b/testsuites/psxtests/configure.ac
@@ -96,6 +96,7 @@ psx12/Makefile
psx13/Makefile
psx14/Makefile
psx15/Makefile
+psx16/Makefile
psxaio01/Makefile
psxaio02/Makefile
psxaio03/Makefile
diff --git a/testsuites/psxtests/psx12/task.c b/testsuites/psxtests/psx12/task.c
index c06263f81d..1b3867854e 100644
--- a/testsuites/psxtests/psx12/task.c
+++ b/testsuites/psxtests/psx12/task.c
@@ -30,6 +30,11 @@ void *Task_1(
void *argument
)
{
+ /*
+ * Detach ourselves so we don't wait for a join that won't happen.
+ */
+ pthread_detach( pthread_self() );
+
puts( "Task_1: exitting" );
pthread_exit( NULL );
diff --git a/testsuites/psxtests/psxkey03/init.c b/testsuites/psxtests/psxkey03/init.c
index 139767e4a3..cd5a0fd0f9 100644
--- a/testsuites/psxtests/psxkey03/init.c
+++ b/testsuites/psxtests/psxkey03/init.c
@@ -32,6 +32,11 @@ void *Test_Thread(
{
int sc;
+ /*
+ * Detach ourselves so we don't wait for a join that won't happen.
+ */
+ pthread_detach( pthread_self() );
+
puts( "Test_Thread - pthread_setspecific - OK" );
sc = pthread_setspecific( Key, key_value );
rtems_test_assert( !sc );
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 );