mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-21 16:44:32 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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 \
|
||||
|
||||
@@ -96,6 +96,7 @@ psx12/Makefile
|
||||
psx13/Makefile
|
||||
psx14/Makefile
|
||||
psx15/Makefile
|
||||
psx16/Makefile
|
||||
psxaio01/Makefile
|
||||
psxaio02/Makefile
|
||||
psxaio03/Makefile
|
||||
|
||||
@@ -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 );
|
||||
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user