diff options
Diffstat (limited to 'generic/tclThreadJoin.c')
-rw-r--r-- | generic/tclThreadJoin.c | 32 |
1 files changed, 15 insertions, 17 deletions
diff --git a/generic/tclThreadJoin.c b/generic/tclThreadJoin.c index 7abcfcc..5c70a62 100644 --- a/generic/tclThreadJoin.c +++ b/generic/tclThreadJoin.c @@ -10,13 +10,11 @@ * * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. - * - * RCS: @(#) $Id: tclThreadJoin.c,v 1.6 2005/07/19 22:45:35 dkf Exp $ */ #include "tclInt.h" -#ifdef WIN32 +#ifdef _WIN32 /* * The information about each joinable thread is remembered in a structure as @@ -54,7 +52,7 @@ typedef struct JoinableThread { TCL_DECLARE_MUTEX(joinMutex) -static JoinableThread* firstThreadPtr; +static JoinableThread *firstThreadPtr; /* *---------------------------------------------------------------------- @@ -78,9 +76,9 @@ static JoinableThread* firstThreadPtr; */ int -TclJoinThread(id, result) - Tcl_ThreadId id; /* The id of the thread to wait upon. */ - int *result; /* Reference to a location for the result of +TclJoinThread( + Tcl_ThreadId id, /* The id of the thread to wait upon. */ + int *result) /* Reference to a location for the result of * the thread we are waiting upon. */ { JoinableThread *threadPtr; @@ -203,7 +201,7 @@ TclJoinThread(id, result) Tcl_ConditionFinalize(&threadPtr->cond); Tcl_MutexFinalize(&threadPtr->threadMutex); - ckfree((char *) threadPtr); + ckfree(threadPtr); return TCL_OK; } @@ -226,13 +224,13 @@ TclJoinThread(id, result) *---------------------------------------------------------------------- */ -VOID -TclRememberJoinableThread(id) - Tcl_ThreadId id; /* The thread to remember as joinable */ +void +TclRememberJoinableThread( + Tcl_ThreadId id) /* The thread to remember as joinable */ { JoinableThread *threadPtr; - threadPtr = (JoinableThread *) ckalloc(sizeof(JoinableThread)); + threadPtr = ckalloc(sizeof(JoinableThread)); threadPtr->id = id; threadPtr->done = 0; threadPtr->waitedUpon = 0; @@ -265,10 +263,10 @@ TclRememberJoinableThread(id) *---------------------------------------------------------------------- */ -VOID -TclSignalExitThread(id,result) - Tcl_ThreadId id; /* Id of the thread signaling its exit. */ - int result; /* The result from the thread. */ +void +TclSignalExitThread( + Tcl_ThreadId id, /* Id of the thread signaling its exit. */ + int result) /* The result from the thread. */ { JoinableThread *threadPtr; @@ -307,7 +305,7 @@ TclSignalExitThread(id,result) Tcl_MutexUnlock(&threadPtr->threadMutex); } -#endif /* WIN32 */ +#endif /* _WIN32 */ /* * Local Variables: |