Tcl Source Code

Check-in [fc0e0a02ad]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:* win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that thread key creation is successful.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: fc0e0a02ad65287c1e482fdb2df0c1756b9332c5
User & Date: georgeps 2008-07-16 23:31:29
Context
2008-07-17
15:43
Add NRE support to [dict with]. check-in: 6f1625197f user: dkf tags: trunk
2008-07-16
23:31
* win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain that thread key creation is successf... check-in: fc0e0a02ad user: georgeps tags: trunk
22:08
NRE-aware TclOO. check-in: a8d83acd18 user: dkf tags: trunk, potential incompatibility
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7




2008-07-16  Donal K. Fellows  <[email protected]>

	* generic/tclOO.c, generic/tclOOInt.h, generic/tclOOBasic.c:
	* generic/tclOOCall.c, generic/tclOOMethod.c: NRE-enable the TclOO
	implementation in Tcl. No change to public APIs, except that method
	implementations can now be NRE-aware if they choose (which normal
	methods and forwards are). On the other hand, callers of
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2008-07-16  George Peter Staplin <[email protected]>
	
	* win/tclWinThrd.c: Test for TLS_OUT_OF_INDEXES to make certain	that
	thread key creation is successful.

2008-07-16  Donal K. Fellows  <[email protected]>

	* generic/tclOO.c, generic/tclOOInt.h, generic/tclOOBasic.c:
	* generic/tclOOCall.c, generic/tclOOMethod.c: NRE-enable the TclOO
	implementation in Tcl. No change to public APIs, except that method
	implementations can now be NRE-aware if they choose (which normal
	methods and forwards are). On the other hand, callers of

Changes to win/tclWinThrd.c.

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
965
966
967
968
969
970
971




972
973
974
975
976
977
978
 * Copyright (c) 1998 by Sun Microsystems, Inc.
 * Copyright (c) 1999 by Scriptics Corporation
 * Copyright (c) 2008 by George Peter Staplin
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclWinThrd.c,v 1.46 2008/06/13 05:45:15 mistachkin Exp $
 */

#include "tclWinInt.h"

#include <fcntl.h>
#include <io.h>
#include <sys/stat.h>
................................................................................

    key = TclpSysAlloc(sizeof *key, 0);
    if (key == NULL) {
	Tcl_Panic("unable to allocate thread key!");
    }
    
    *key = TlsAlloc();




    
    return key;
}

void TclpThreadDeleteKey(void *keyPtr) {
    DWORD *key = keyPtr;







|







 







>
>
>
>







6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
...
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
 * Copyright (c) 1998 by Sun Microsystems, Inc.
 * Copyright (c) 1999 by Scriptics Corporation
 * Copyright (c) 2008 by George Peter Staplin
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclWinThrd.c,v 1.47 2008/07/16 23:31:29 georgeps Exp $
 */

#include "tclWinInt.h"

#include <fcntl.h>
#include <io.h>
#include <sys/stat.h>
................................................................................

    key = TclpSysAlloc(sizeof *key, 0);
    if (key == NULL) {
	Tcl_Panic("unable to allocate thread key!");
    }
    
    *key = TlsAlloc();

    if (*key == TLS_OUT_OF_INDEXES) {
	Tcl_Panic("unable to allocate thread-local storage");
    }
    
    return key;
}

void TclpThreadDeleteKey(void *keyPtr) {
    DWORD *key = keyPtr;