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.
This commit is contained in:
Joel Sherrill
2011-07-31 16:16:17 +00:00
parent 25715ecc42
commit 76e9a52f29
6 changed files with 31 additions and 1 deletions
+8
View File
@@ -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
+2 -1
View File
@@ -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 \
+1
View File
@@ -96,6 +96,7 @@ psx12/Makefile
psx13/Makefile
psx14/Makefile
psx15/Makefile
psx16/Makefile
psxaio01/Makefile
psxaio02/Makefile
psxaio03/Makefile
+5
View File
@@ -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 );
+5
View File
@@ -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 );
+10
View File
@@ -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 );