diff options
author | hobbs <hobbs> | 2000-04-09 21:14:22 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2000-04-09 21:14:22 (GMT) |
commit | 30b85ad8f04057b9e09d22e6e5317c81338b4c2b (patch) | |
tree | 0c1c884c8847240f26b3d6bbf226ae756f130c2c /unix | |
parent | efe824c8141a780f310fc5aef29a013f53fe541c (diff) | |
download | tcl-30b85ad8f04057b9e09d22e6e5317c81338b4c2b.zip tcl-30b85ad8f04057b9e09d22e6e5317c81338b4c2b.tar.gz tcl-30b85ad8f04057b9e09d22e6e5317c81338b4c2b.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).
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 /* *---------------------------------------------------------------------- * |