diff options
Diffstat (limited to 'generic/tclThread.c')
-rw-r--r-- | generic/tclThread.c | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c index a70f1aa..8def429 100644 --- a/generic/tclThread.c +++ b/generic/tclThread.c @@ -41,21 +41,6 @@ static void RememberSyncObject(void *objPtr, SyncObjRecord *recPtr); /* - * Several functions are #defined to nothing in tcl.h if TCL_THREADS is not - * specified. Here we undo that so the functions are defined in the stubs - * table. - */ - -#if defined(TCL_THREADS) && !TCL_THREADS -#undef Tcl_MutexLock -#undef Tcl_MutexUnlock -#undef Tcl_MutexFinalize -#undef Tcl_ConditionNotify -#undef Tcl_ConditionWait -#undef Tcl_ConditionFinalize -#endif - -/* *---------------------------------------------------------------------- * * Tcl_GetThreadData -- @@ -79,7 +64,7 @@ Tcl_GetThreadData( int size) /* Size of storage block */ { void *result; -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS /* * Initialize the key for this thread. */ @@ -126,7 +111,7 @@ TclThreadDataKeyGet( Tcl_ThreadDataKey *keyPtr) /* Identifier for the data chunk. */ { -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS return TclThreadStorageKeyGet(keyPtr); #else /* TCL_THREADS */ return *keyPtr; @@ -273,7 +258,7 @@ void Tcl_MutexFinalize( Tcl_Mutex *mutexPtr) { -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS TclpFinalizeMutex(mutexPtr); #endif TclpMasterLock(); @@ -326,7 +311,7 @@ void Tcl_ConditionFinalize( Tcl_Condition *condPtr) { -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS TclpFinalizeCondition(condPtr); #endif TclpMasterLock(); @@ -356,7 +341,7 @@ void TclFinalizeThreadData(int quick) { TclFinalizeThreadDataThread(); -#if (!defined(TCL_THREADS) || TCL_THREADS) && defined(USE_THREAD_ALLOC) +#if TCL_THREADS && defined(USE_THREAD_ALLOC) if (!quick) { /* * Quick exit principle makes it useless to terminate allocators @@ -389,7 +374,7 @@ TclFinalizeSynchronization(void) int i; void *blockPtr; Tcl_ThreadDataKey *keyPtr; -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS Tcl_Mutex *mutexPtr; Tcl_Condition *condPtr; @@ -413,7 +398,7 @@ TclFinalizeSynchronization(void) keyRecord.max = 0; keyRecord.num = 0; -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS /* * Call thread storage master cleanup. */ @@ -473,12 +458,12 @@ Tcl_ExitThread( int status) { Tcl_FinalizeThread(); -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS TclpThreadExit(status); #endif } -#if defined(TCL_THREADS) && !TCL_THREADS +#if !TCL_THREADS /* *---------------------------------------------------------------------- |