diff options
author | welch <welch> | 2000-04-17 20:32:21 (GMT) |
---|---|---|
committer | welch <welch> | 2000-04-17 20:32:21 (GMT) |
commit | 88d769137e19818849c896edc1fad629212e1734 (patch) | |
tree | 3bfadebb521e935a8977c64957d4dcb011fa3f6b /generic/tcl.h | |
parent | b8877f70b31edc02d135d43fdce726fa4b384c6f (diff) | |
download | tcl-88d769137e19818849c896edc1fad629212e1734.zip tcl-88d769137e19818849c896edc1fad629212e1734.tar.gz tcl-88d769137e19818849c896edc1fad629212e1734.tar.bz2 |
Added Tcl_CreateThreadType and TCL_RETURN_THREAD_TYPE
macros for declaring the NewThread callback proc.
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index 42b488e..3e49b10 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.68 2000/04/13 02:30:43 hobbs Exp $ + * RCS: @(#) $Id: tcl.h,v 1.69 2000/04/17 20:32:21 welch Exp $ */ #ifndef _TCL @@ -395,10 +395,31 @@ typedef struct Tcl_Var_ *Tcl_Var; #ifdef MAC_TCL typedef pascal void *(Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); +#elif defined __WIN32__ +typedef unsigned (__stdcall Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); #else typedef void (Tcl_ThreadCreateProc) _ANSI_ARGS_((ClientData clientData)); #endif + +/* + * Threading function return types used for abstracting away platform + * differences when writing a Tcl_ThreadCreateProc. See the NewThread + * function in generic/tclThreadTest.c for it's usage. + */ +#ifdef MAC_TCL +# define Tcl_ThreadCreateType pascal void * +# define TCL_THREAD_CREATE_RETURN return NULL +#elif defined __WIN32__ +# define Tcl_ThreadCreateType unsigned __stdcall +# define TCL_THREAD_CREATE_RETURN return 0 +#else +# define Tcl_ThreadCreateType void +# define TCL_THREAD_CREATE_RETURN +#endif + + + /* * Definition of values for default stacksize and the possible flags to be * given to Tcl_CreateThread. |