summaryrefslogtreecommitdiffstats
path: root/generic/tclFileSystem.h
diff options
context:
space:
mode:
authorvasiljevic <zv@archiware.com>2003-08-23 12:16:49 (GMT)
committervasiljevic <zv@archiware.com>2003-08-23 12:16:49 (GMT)
commit0359aa1dedfd9abdaef6487a9593f462ebe1265f (patch)
tree8dfe7ee35a2f08c915b822aeab8c5777131bdfbf /generic/tclFileSystem.h
parent81daad7e60d1890ac0080146642a9226d0f25948 (diff)
downloadtcl-0359aa1dedfd9abdaef6487a9593f462ebe1265f.zip
tcl-0359aa1dedfd9abdaef6487a9593f462ebe1265f.tar.gz
tcl-0359aa1dedfd9abdaef6487a9593f462ebe1265f.tar.bz2
Applied changes from 8.4.4 regarding the Bug #753315
Diffstat (limited to 'generic/tclFileSystem.h')
-rw-r--r--generic/tclFileSystem.h30
1 files changed, 25 insertions, 5 deletions
diff --git a/generic/tclFileSystem.h b/generic/tclFileSystem.h
index 966f221..7d74dc2 100644
--- a/generic/tclFileSystem.h
+++ b/generic/tclFileSystem.h
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclFileSystem.h,v 1.2 2003/04/14 15:48:35 vincentdarley Exp $
+ * RCS: @(#) $Id: tclFileSystem.h,v 1.3 2003/08/23 12:16:49 vasiljevic Exp $
*/
/*
@@ -31,8 +31,28 @@ typedef struct FilesystemRecord {
struct FilesystemRecord *nextPtr;
/* The next filesystem registered
* to Tcl, or NULL if no more. */
+ struct FilesystemRecord *prevPtr;
+ /* The previous filesystem registered
+ * to Tcl, or NULL if no more. */
} FilesystemRecord;
+/*
+ * This structure holds per-thread private copy of the
+ * current directory maintained by the global cwdPathPtr.
+ * This structure holds per-thread private copies of
+ * some global data. This way we avoid most of the
+ * synchronization calls which boosts performance, at
+ * cost of having to update this information each
+ * time the corresponding epoch counter changes.
+ */
+typedef struct ThreadSpecificData {
+ int initialized;
+ int cwdPathEpoch;
+ int filesystemEpoch;
+ Tcl_Obj *cwdPathPtr;
+ FilesystemRecord *filesystemList;
+} ThreadSpecificData;
+
/*
* The internal TclFS API provides routines for handling and
* manipulating paths efficiently, taking direct advantage of
@@ -50,12 +70,11 @@ Tcl_Obj* TclFSMakePathRelative _ANSI_ARGS_((Tcl_Interp *interp,
Tcl_Obj *objPtr, Tcl_Obj *cwdPtr));
Tcl_Obj* TclFSInternalToNormalized _ANSI_ARGS_((
Tcl_Filesystem *fromFilesystem, ClientData clientData,
- FilesystemRecord **fsRecPtrPtr, int *epochPtr));
-int TclFSEnsureEpochOk _ANSI_ARGS_((Tcl_Obj* pathObjPtr, int theEpoch,
+ FilesystemRecord **fsRecPtrPtr));
+int TclFSEnsureEpochOk _ANSI_ARGS_((Tcl_Obj* pathObjPtr,
Tcl_Filesystem **fsPtrPtr));
void TclFSSetPathDetails _ANSI_ARGS_((Tcl_Obj *pathObjPtr,
- FilesystemRecord *fsRecPtr, ClientData clientData,
- int theEpoch));
+ FilesystemRecord *fsRecPtr, ClientData clientData ));
Tcl_Obj* TclFSNormalizeAbsolutePath _ANSI_ARGS_((Tcl_Interp* interp,
Tcl_Obj *pathPtr, ClientData *clientDataPtr));
@@ -64,6 +83,7 @@ Tcl_Obj* TclFSNormalizeAbsolutePath _ANSI_ARGS_((Tcl_Interp* interp,
*/
extern Tcl_Filesystem tclNativeFilesystem;
extern int theFilesystemEpoch;
+extern Tcl_ThreadDataKey fsDataKey;
/*
* Private shared functions for use by tclIOUtil.c and tclPathObj.c