diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | create.c | 5 | ||||
-rw-r--r-- | sync.c | 2 |
3 files changed, 13 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Fri Jul 24 16:33:17 1998 Ross Johnson <rpj@swan.canberra.edu.au> + + * sync.c (pthread_detach): Use equality test, not assignment. + + * create.c (_pthread_start_call): Add call to Win32 CloseHandle() + if thread is detached. + 1998-07-24 Ben Elliston <bje@cygnus.com> * sync.c (pthread_detach): Close the Win32 thread handle to @@ -24,6 +24,11 @@ _pthread_start_call(void * thisarg) unsigned ret; int from; + if (this->detached == PTHREAD_CREATE_DETACHED) + { + (void) CloseHandle(this->thread); + } + func = this->call.routine; arg = this->call.arg; @@ -73,7 +73,7 @@ pthread_detach(pthread_t thread) this = _pthread_find_thread_entry(thread); - if (this = -1) + if (this == -1) { return ESRCH; } |