Tcl Source Code

Check-in [ede99b1301]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed warnings from VC++.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-1-branch-old
Files: files | file ages | folders
SHA1:ede99b1301af6eb4f634ef1e9cae8a3116aba04f
User & Date: redman 1999-04-02 19:43:22
Context
1999-04-02
22:30
safe-6.3 now passes on Windows and Unix for both release and debug. This addresses item 81 on the wh... check-in: 8c40033f93 user: hershey tags: core-8-1-branch-old
19:43
Fixed warnings from VC++. check-in: ede99b1301 user: redman tags: core-8-1-branch-old
18:59
lint check-in: 13af4c70f4 user: hershey tags: core-8-1-branch-old
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to win/tclWinThrd.c.

82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
671
672
673
674
675
676
677
678

679
680
681
682
683
684
685
...
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
typedef struct WinCondition {
    CRITICAL_SECTION condLock;	/* Lock to serialize queuing on the condition */
    struct ThreadSpecificData *firstPtr;	/* Queue pointers */
    struct ThreadSpecificData *lastPtr;
} WinCondition;

static void *FinalizeConditionEvent(ClientData data);

 
/*
 *----------------------------------------------------------------------
 *
 * TclpThreadCreate --
 *
................................................................................
	     * Create a per-thread exit handler to clean up the condEvent.
	     * We must be careful do do this outside the Master Lock
	     * because Tcl_CreateThreadExitHandler uses its own
	     * ThreadSpecificData, and initializing that may drop
	     * back into the Master Lock.
	     */
	    
	    Tcl_CreateThreadExitHandler(FinalizeConditionEvent, tsdPtr);

	}
    }

    if (*condPtr == NULL) {
	MASTER_LOCK;

	/*
................................................................................
 *
 * Side effects:
 *	The per-thread event is closed.
 *
 *----------------------------------------------------------------------
 */

static void *
FinalizeConditionEvent(data)
    ClientData data;
{
    ThreadSpecificData *tsdPtr = (ThreadSpecificData *)data;
    tsdPtr->flags = WIN_THREAD_DEAD;
    CloseHandle(tsdPtr->condEvent);
}






|







 







|
>







 







|







82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
...
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
...
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
typedef struct WinCondition {
    CRITICAL_SECTION condLock;	/* Lock to serialize queuing on the condition */
    struct ThreadSpecificData *firstPtr;	/* Queue pointers */
    struct ThreadSpecificData *lastPtr;
} WinCondition;

static void FinalizeConditionEvent(ClientData data);

 
/*
 *----------------------------------------------------------------------
 *
 * TclpThreadCreate --
 *
................................................................................
	     * Create a per-thread exit handler to clean up the condEvent.
	     * We must be careful do do this outside the Master Lock
	     * because Tcl_CreateThreadExitHandler uses its own
	     * ThreadSpecificData, and initializing that may drop
	     * back into the Master Lock.
	     */
	    
	    Tcl_CreateThreadExitHandler(FinalizeConditionEvent,
		    (ClientData) tsdPtr);
	}
    }

    if (*condPtr == NULL) {
	MASTER_LOCK;

	/*
................................................................................
 *
 * Side effects:
 *	The per-thread event is closed.
 *
 *----------------------------------------------------------------------
 */

static void
FinalizeConditionEvent(data)
    ClientData data;
{
    ThreadSpecificData *tsdPtr = (ThreadSpecificData *)data;
    tsdPtr->flags = WIN_THREAD_DEAD;
    CloseHandle(tsdPtr->condEvent);
}