From 76e9a52f29c61a2d96e7a45394019d172a408f49 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Sun, 31 Jul 2011 16:16:17 +0000 Subject: 2011-07-31 Joel Sherrill 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. --- testsuites/psxtests/psx12/task.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuites/psxtests/psx12') 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 ); -- cgit v1.2.3