summaryrefslogtreecommitdiffstats
path: root/generic/tclThreadAlloc.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2014-05-02 07:15:49 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2014-05-02 07:15:49 (GMT)
commite338d72a45468bad9139adc4d43a4167d4e244c6 (patch)
tree870a6a99179fa39483426248efdf8be62fc04f2e /generic/tclThreadAlloc.c
parentb9c49065a55f1a7ddbda005962a9d0847045c274 (diff)
parentccc37a91935f90ede0be48b9a71b93f54267e608 (diff)
downloadtcl-e338d72a45468bad9139adc4d43a4167d4e244c6.zip
tcl-e338d72a45468bad9139adc4d43a4167d4e244c6.tar.gz
tcl-e338d72a45468bad9139adc4d43a4167d4e244c6.tar.bz2
merge novem
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 c891b75..d8f15ec 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) */
/*
*----------------------------------------------------------------------