Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: d9723cfa28b91408cc9ccd3720745d306f805909
Ticket: 731356ffffffffffffffffffffffffffffffffff
Win32 non-TLS thread storage patch...
User & Date: mistachkin on 2003-05-11 08:42:35
Changes

  1. icomment:
    Logged In: YES 
    user_id=113501
    
    Let me address your comments one by one:
    
    (1) I think you are totally right about this. It should be a 
    variable that is defaulted to a prime number.
    
    (2) I believe they should go into tclInt.decls, it slipped 
    my mind at the time.
    
    (3) The functions in question are most likely the alloc 
    cache functions, which strangely never had any 
    prologue comments. I believe I added one function to 
    this set of functions and I figured "why comment?" if 
    there were no other comments regarding these 
    particular functions.  All the other functions I added 
    should have prologue comments.
    
    (4) I agree about this too.  However, some work will 
    need to be done to make this cross-platform.  I have 
    proposed to JeffH that we create a new file for this 
    subsystem and call it "generic/tclThreadStorage.c".
    
    (5) The difference between these flags is very important, 
    actually.  The TCL_NO_TLS flag prevents TLS from being 
    used for "high level" thread local storage operations 
    (TclpThreadDataKeyInit/TclpThreadDataKeyGet/TclpThre
    adDataKeySet).  The TCL_THREAD_ALLOC_NO_TLS 
    forces the threaded memory allocator (which is MUCH 
    more low level) to NOT use TLS.  These flags should 
    definitely stay separate.
    
    Did you notice that I made some changes to tclHash.c 
    (the ability to use TclpSysAlloc/TclpSysFree instead of 
    ckalloc/ckfree for the non-entry parts of the table that 
    need to be dynamically allocated) and tcl.h (a new hash 
    key type flag)?  It is my hope that these changes will 
    NOT require a TIP, because without them, the threaded 
    memory allocator CANNOT use hash tables (due to 
    circular dependency issues).
    
    In conclusion, I don't think this patch should be 
    committed as is.  I'm still working on some ideas and I 
    think that we should make the "new" code cross-
    platform. Oh, and I think we should leave in support for 
    the "legacy" thread local storage stuff that's in there 
    now.
    
    
    
  2. login: "mistachkin"
  3. mimetype: "text/plain"
  4. username: "mistachkin"