diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2018-06-02 14:19:33 (GMT) | 
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2018-06-02 14:19:33 (GMT) | 
| commit | 63be474164fb2a29b17269cc7bc821d23ed6805e (patch) | |
| tree | 7f717a781c3f045b19d2c31fafbc7ce30e319c39 /generic/tclThread.c | |
| parent | 6ab540f5ff1eca1d921e511eed5caaa192f4e547 (diff) | |
| parent | 5e3ca11761b27133a62ee5cd5e340956c640ca8d (diff) | |
| download | tcl-63be474164fb2a29b17269cc7bc821d23ed6805e.zip tcl-63be474164fb2a29b17269cc7bc821d23ed6805e.tar.gz tcl-63be474164fb2a29b17269cc7bc821d23ed6805e.tar.bz2  | |
merge core-8-branch
Diffstat (limited to 'generic/tclThread.c')
| -rw-r--r-- | generic/tclThread.c | 35 | 
1 files changed, 10 insertions, 25 deletions
diff --git a/generic/tclThread.c b/generic/tclThread.c index a70f1aa..cafd824 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; @@ -269,11 +254,12 @@ TclRememberMutex(   *----------------------------------------------------------------------   */ +#undef Tcl_MutexFinalize  void  Tcl_MutexFinalize(      Tcl_Mutex *mutexPtr)  { -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS      TclpFinalizeMutex(mutexPtr);  #endif      TclpMasterLock(); @@ -322,11 +308,12 @@ TclRememberCondition(   *----------------------------------------------------------------------   */ +#undef Tcl_ConditionFinalize  void  Tcl_ConditionFinalize(      Tcl_Condition *condPtr)  { -#if !defined(TCL_THREADS) || TCL_THREADS +#if TCL_THREADS      TclpFinalizeCondition(condPtr);  #endif      TclpMasterLock(); @@ -356,7 +343,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 +376,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 +400,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 +460,10 @@ Tcl_ExitThread(      int status)  {      Tcl_FinalizeThread(); -#if !defined(TCL_THREADS) || TCL_THREADS      TclpThreadExit(status); -#endif  } -#if defined(TCL_THREADS) && !TCL_THREADS +#if !TCL_THREADS  /*   *----------------------------------------------------------------------  | 
