summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclEvent.c2
-rw-r--r--generic/tclInt.h4
-rw-r--r--unix/tclUnixThrd.c16
-rw-r--r--win/tclWinThrd.c2
4 files changed, 11 insertions, 13 deletions
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index d62850b..a16a3b1 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1044,7 +1044,7 @@ TclInitSubsystems(void)
TclInitAlloc(); /* Process wide mutex init */
#endif
#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
- TclpInitThreadAlloc();
+ TclpInitAllocCache();
#endif
#ifdef TCL_MEM_DEBUG
TclInitDbCkalloc(); /* Process wide mutex init */
diff --git a/generic/tclInt.h b/generic/tclInt.h
index d481cde..34430c8 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3146,9 +3146,6 @@ MODULE_SCOPE int TclpLoadMemory(Tcl_Interp *interp, void *buffer,
Tcl_FSUnloadFileProc **unloadProcPtr, int flags);
#endif
MODULE_SCOPE void TclInitThreadStorage(void);
-#if defined(TCL_THREADS) && defined(USE_THREAD_ALLOC)
-MODULE_SCOPE void TclpInitThreadAlloc(void);
-#endif
MODULE_SCOPE void TclFinalizeThreadDataThread(void);
MODULE_SCOPE void TclFinalizeThreadStorage(void);
#ifdef TCL_WIDE_CLICKS
@@ -4087,6 +4084,7 @@ MODULE_SCOPE void TclFreeAllocCache(void *);
MODULE_SCOPE void * TclpGetAllocCache(void);
MODULE_SCOPE void TclpSetAllocCache(void *);
MODULE_SCOPE void TclpFreeAllocMutex(Tcl_Mutex *mutex);
+MODULE_SCOPE void TclpInitAllocCache(void);
MODULE_SCOPE void TclpFreeAllocCache(void *);
/*
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 070a107..562c7ee 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -709,6 +709,14 @@ TclpFreeAllocMutex(
}
void
+TclpInitAllocCache(void)
+{
+ pthread_mutex_lock(allocLockPtr);
+ pthread_key_create(&key, TclpFreeAllocCache);
+ pthread_mutex_unlock(allocLockPtr);
+}
+
+void
TclpFreeAllocCache(
void *ptr)
{
@@ -725,14 +733,6 @@ TclpFreeAllocCache(
}
}
-void
-TclpInitThreadAlloc(void)
-{
- pthread_mutex_lock(allocLockPtr);
- pthread_key_create(&key, TclpFreeAllocCache);
- pthread_mutex_unlock(allocLockPtr);
-}
-
void *
TclpGetAllocCache(void)
{
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 8791c19..4eb3573 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -968,7 +968,7 @@ TclpFreeAllocMutex(
}
void
-TclpInitThreadAlloc(void)
+TclpInitAllocCache(void)
{
/*
* We need to make sure that TclpFreeAllocCache is called on each