diff options
author | hobbs <hobbs> | 2007-05-29 23:35:05 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2007-05-29 23:35:05 (GMT) |
commit | dd4bd718f68c159cfd56b0a21fb425a8fdf4941a (patch) | |
tree | 4314da52ad4247696c8d9ce3ed8e5e32f1ea0063 | |
parent | 460524e86d044884041f17b82af28c073181165d (diff) | |
download | tcl-dd4bd718f68c159cfd56b0a21fb425a8fdf4941a.zip tcl-dd4bd718f68c159cfd56b0a21fb425a8fdf4941a.tar.gz tcl-dd4bd718f68c159cfd56b0a21fb425a8fdf4941a.tar.bz2 |
* unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling of
pthread_join exit return code storage. [Bug 1712723]
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | unix/tclUnixThrd.c | 10 |
2 files changed, 12 insertions, 3 deletions
@@ -1,3 +1,8 @@ +2007-05-29 Jeff Hobbs <jeffh@ActiveState.com> + + * unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling of + pthread_join exit return code storage. [Bug 1712723] + 2007-05-18 Don Porter <dgp@users.sourceforge.net> * unix/configure: autoconf-2.59 (FC6 fork) diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 2760360..5f4f15c 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclUnixThrd.c,v 1.51 2006/12/19 16:25:02 dgp Exp $ + * RCS: @(#) $Id: tclUnixThrd.c,v 1.52 2007/05/29 23:35:06 hobbs Exp $ */ #include "tclInt.h" @@ -158,12 +158,16 @@ Tcl_JoinThread( Tcl_ThreadId threadId, /* Id of the thread to wait upon. */ int *state) /* Reference to the storage the result of the * thread we wait upon will be written - * into. */ + * into. May be NULL. */ { #ifdef TCL_THREADS int result; + unsigned long retcode; - result = pthread_join((pthread_t) threadId, (void**) state); + result = pthread_join((pthread_t) threadId, (void**) &retcode); + if (state) { + *state = (int) retcode; + } return (result == 0) ? TCL_OK : TCL_ERROR; #else return TCL_ERROR; |