From 537fe68bc5ca2dd75f4f54146a50a39c5b55b8e3 Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 26 Jul 1998 14:49:34 +0000 Subject: Mon Jul 27 00:20:37 1998 Ross Johnson * private.c (_pthread_delete_thread_entry): Destroy the thread entry attribute object before deleting the thread entry itself. * attr.c (pthread_attr_init): Initialise cancel_pending = FALSE. (pthread_attr_setdetachstate): Rename "detached" to "detachedstate". (pthread_attr_getdetachstate): Ditto. * exit.c (_pthread_exit): Fix incorrect check for detachedstate. * implement.h (_pthread_call_t): Remove env member. --- exit.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'exit.c') diff --git a/exit.c b/exit.c index 429dfd2..4d0f42c 100644 --- a/exit.c +++ b/exit.c @@ -55,7 +55,8 @@ _pthread_exit(void * value, int return_code) be deleted by the last waiting pthread_join() after this thread has terminated. */ - if (us->detach == TRUE + if (pthread_attr_getdetachedstate(us, &detachstate) == 0 + && detachstate == PTHREAD_CREATE_DETACHED && us->join_count == 0) { _pthread_delete_thread_entry(us); -- cgit v1.2.3