summaryrefslogtreecommitdiffstats
path: root/generic/tclThreadAlloc.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-05-01 15:16:37 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-05-01 15:16:37 (GMT)
commitfa235831f2b82fb7ffe59755c8d5b19f185a88fb (patch)
treecaab1eb18613bb672c08214eab97c65743f7587e /generic/tclThreadAlloc.c
parent3ae9b2df5c8301472274c78ce82deaed61e36583 (diff)
parentabd9269a041e4bf2bf41d48bab0035e0be511cd3 (diff)
downloadtcl-fa235831f2b82fb7ffe59755c8d5b19f185a88fb.zip
tcl-fa235831f2b82fb7ffe59755c8d5b19f185a88fb.tar.gz
tcl-fa235831f2b82fb7ffe59755c8d5b19f185a88fb.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclThreadAlloc.c')
-rw-r--r--generic/tclThreadAlloc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/generic/tclThreadAlloc.c b/generic/tclThreadAlloc.c
index 438efc5..3c8f335 100644
--- a/generic/tclThreadAlloc.c
+++ b/generic/tclThreadAlloc.c
@@ -1023,6 +1023,33 @@ TclFinalizeThreadAlloc(void)
TclpFreeAllocCache(NULL);
}
+/*
+ *----------------------------------------------------------------------
+ *
+ * TclFinalizeThreadAllocThread --
+ *
+ * This procedure is used to destroy single thread private resources used
+ * in this file.
+ * Called in TclpFinalizeThreadData when a thread exits (Tcl_FinalizeThread).
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+void
+TclFinalizeThreadAllocThread(void)
+{
+ Cache *cachePtr = TclpGetAllocCache();
+ if (cachePtr != NULL) {
+ TclpFreeAllocCache(cachePtr);
+ }
+}
+
#else /* !(TCL_THREADS && USE_THREAD_ALLOC) */
/*
*----------------------------------------------------------------------