diff options
author | hobbs <hobbs@noemail.net> | 2000-04-09 21:14:21 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2000-04-09 21:14:21 (GMT) |
commit | 231d352f0d93f48145fffb15ee81babffb525245 (patch) | |
tree | 0c1c884c8847240f26b3d6bbf226ae756f130c2c /unix | |
parent | 7e3db52bd6b4a10994ce353eedad1d28dc7c3200 (diff) | |
download | tcl-231d352f0d93f48145fffb15ee81babffb525245.zip tcl-231d352f0d93f48145fffb15ee81babffb525245.tar.gz tcl-231d352f0d93f48145fffb15ee81babffb525245.tar.bz2 |
* unix/tclUnixThrd.c (Tcl_CreateThread): moved TCL_THREADS ifdef
inside of func as it is declared for non-threads builds as well.
In the non-threads case, it always returns TCL_ERROR (couldn't
create thread).
FossilOrigin-Name: 26ed7e69c33d7d8c8b70a0997ed948a219509147
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tclUnixThrd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index ca3e592..fb6e8cb 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -54,7 +54,6 @@ static pthread_mutex_t *allocLockPtr = &allocLock; -#ifdef TCL_THREADS /* *---------------------------------------------------------------------- @@ -82,6 +81,7 @@ Tcl_CreateThread(idPtr, proc, clientData, stackSize, flags) int flags; /* Flags controlling behaviour of * the new thread */ { +#ifdef TCL_THREADS pthread_attr_t attr; int result; @@ -128,8 +128,12 @@ Tcl_CreateThread(idPtr, proc, clientData, stackSize, flags) } pthread_attr_destroy(&attr); return result; +#else + return TCL_ERROR; +#endif /* TCL_THREADS */ } +#ifdef TCL_THREADS /* *---------------------------------------------------------------------- * |