diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-04 06:54:24 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-07-04 06:54:24 (GMT) |
commit | d409a29e57b2d4ced1bad4b0bb5bb1e2387f4120 (patch) | |
tree | b94ae208eb9dfbc5fd5839c4a5fc7747ae5f2eb1 /unix/tclUnixThrd.c | |
parent | cc1e30158793a4c08f066242a62aeba0a777c263 (diff) | |
download | tcl-d409a29e57b2d4ced1bad4b0bb5bb1e2387f4120.zip tcl-d409a29e57b2d4ced1bad4b0bb5bb1e2387f4120.tar.gz tcl-d409a29e57b2d4ced1bad4b0bb5bb1e2387f4120.tar.bz2 |
Experiment: compile Tcl with C++ compiler. WIP
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r-- | unix/tclUnixThrd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 60340b0..30e19ca 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -577,7 +577,7 @@ Tcl_MutexLock( * Double inside master lock check to avoid a race condition. */ - pmutexPtr = ckalloc(sizeof(PMutex)); + pmutexPtr = (PMutex *)ckalloc(sizeof(PMutex)); PMutexInit(pmutexPtr); *mutexPtr = (Tcl_Mutex) pmutexPtr; TclRememberMutex(mutexPtr); @@ -687,7 +687,7 @@ Tcl_ConditionWait( */ if (*condPtr == NULL) { - pcondPtr = ckalloc(sizeof(pthread_cond_t)); + pcondPtr = (pthread_cond_t *)ckalloc(sizeof(pthread_cond_t)); pthread_cond_init(pcondPtr, NULL); *condPtr = (Tcl_Condition) pcondPtr; TclRememberCondition(condPtr); @@ -846,7 +846,7 @@ TclpNewAllocMutex(void) AllocMutex *lockPtr; register PMutex *plockPtr; - lockPtr = malloc(sizeof(AllocMutex)); + lockPtr = (AllocMutex *)malloc(sizeof(AllocMutex)); if (lockPtr == NULL) { Tcl_Panic("could not allocate lock"); } @@ -917,7 +917,7 @@ TclpThreadCreateKey(void) { pthread_key_t *ptkeyPtr; - ptkeyPtr = TclpSysAlloc(sizeof(pthread_key_t), 0); + ptkeyPtr = (pthread_key_t *)TclpSysAlloc(sizeof(pthread_key_t), 0); if (NULL == ptkeyPtr) { Tcl_Panic("unable to allocate thread key!"); } @@ -933,7 +933,7 @@ void TclpThreadDeleteKey( void *keyPtr) { - pthread_key_t *ptkeyPtr = keyPtr; + pthread_key_t *ptkeyPtr = (pthread_key_t *)keyPtr; if (pthread_key_delete(*ptkeyPtr)) { Tcl_Panic("unable to delete key!"); @@ -947,7 +947,7 @@ TclpThreadSetMasterTSD( void *tsdKeyPtr, void *ptr) { - pthread_key_t *ptkeyPtr = tsdKeyPtr; + pthread_key_t *ptkeyPtr = (pthread_key_t *)tsdKeyPtr; if (pthread_setspecific(*ptkeyPtr, ptr)) { Tcl_Panic("unable to set master TSD value"); @@ -958,7 +958,7 @@ void * TclpThreadGetMasterTSD( void *tsdKeyPtr) { - pthread_key_t *ptkeyPtr = tsdKeyPtr; + pthread_key_t *ptkeyPtr = (pthread_key_t*)tsdKeyPtr; return pthread_getspecific(*ptkeyPtr); } |