From 231d352f0d93f48145fffb15ee81babffb525245 Mon Sep 17 00:00:00 2001 From: hobbs Date: Sun, 9 Apr 2000 21:14:21 +0000 Subject: * 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 --- ChangeLog | 7 +++++++ unix/tclUnixThrd.c | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index e37d797..5f3564c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-04-09 Jeff Hobbs + + * 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). + 2000-04-08 Andreas Kupries * Overall change: Definition of a public API for the creation of 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 /* *---------------------------------------------------------------------- * -- cgit v0.12