Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 796918c47f3e68289ffc76fc5f397575574bddb9
Ticket: 987967ffffffffffffffffffffffffffffffffff
CRITICAL_SECTION masterLock not initialized
User & Date: sorensenjs on 2004-07-11 19:04:09
Changes

  1. icomment:
    Logged In: YES 
    user_id=1080292
    
    I concur with the comments and think that it would be a good
    thing to have an initialize function, although most of Tcl's
    code currently checks and performs initialization of static
    data through local test and set routines.
    
    On the other hand, the change I'm suggesting would make the
    windows code more like the unix code (which doesn't have
    this problem); would solve the immediate problem of using
    Tcl as a library without creating an interpreter (on
    windows); would not result in significant overhead; and
    finally, would only change this local file locally at
    compile time.  I cannot conceive of an argument against
    making this change.
    
    Specifically, the change is this
    > #define MASTER_LOCK EnterCriticalSection(&masterLock)
    > #define MASTER_UNLOCK LeaveCriticalSection(&masterLock)
    would become
    < #define MASTER_LOCK TclpMasterLock()
    < #define MASTER_UNLOCK TclpMasterUnlock()
    
    While I concur with dgp that there are many Tcl functions
    that could be called, perhaps most obviously
    Tcl_CreateInterp, that would perform this initialization,
    the documentation does not suggest that this should be
    required.  In fact, on unix, it does not seem to be required
    at all.  Perhaps this is not true if you call some deep Tcl
    functions.  The most likely library calls to be used in this
    fashion are Tcl_Obj manipulation, string handling esp.
    utf-8, and regular expressions.
    
     
    
    
  2. login: "sorensenjs"
  3. mimetype: "text/plain"
  4. username: "sorensenjs"