From 5e16c3823829638c614e311586d3e0c9ca0fa32a Mon Sep 17 00:00:00 2001 From: patthoyts Date: Thu, 15 May 2008 00:04:08 +0000 Subject: We should use the thread allocator for threaded builds. Added 'tclalloc' option to disable. --- ChangeLog | 5 +++++ win/makefile.vc | 9 ++++++--- win/nmakehlp.c | 6 +++--- win/rules.vc | 7 +++++-- 4 files changed, 19 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8233bda..a8a5da6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-15 Pat Thoyts + + * win/makefile.vc: We should use the thread allocator for threaded + * win/rules.vc: builds. Added 'tclalloc' option to disable. + 2008-05-09 George Peter Staplin * tools/tsdPerf.c A loadable Tcl extension for testing TSD performance. diff --git a/win/makefile.vc b/win/makefile.vc index af07425..ef914ac 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -10,9 +10,10 @@ # Copyright (c) 1998-2000 Ajuba Solutions. # Copyright (c) 2001-2005 ActiveState Corporation. # Copyright (c) 2001-2004 David Gravereaux. +# Copyright (c) 2003-2008 Pat Thoyts. # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: makefile.vc,v 1.178 2008/04/27 10:59:26 patthoyts Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.179 2008/05/15 00:04:10 patthoyts Exp $ #------------------------------------------------------------------------------ # Check to see we are configured to build with MSVC (MSDEVDIR or MSVCDIR) @@ -90,7 +91,9 @@ the build instructions. # tclshXX.exe to have the dde and reg extension linked # inside it. # threads = Turns on full multithreading support. -# thrdalloc = Use the thread allocator (shared global free pool). +# thrdalloc = Use the thread allocator (shared global free pool) +# This is the default on threaded builds. +# tclalloc = Use the old non-thread allocator # thrdstorage = Use the generic thread storage support. # symbols = Adds symbols for step debugging. # profile = Adds profiling hooks. Map file is assumed. @@ -413,7 +416,7 @@ WINDIR = $(ROOT)\win ### This cranks the optimization level to maximize speed cdebug = -O2 $(OPTIMIZATIONS) !else -cdebug = +cdebug = !endif !else if "$(MACHINE)" == "IA64" || "$(MACHINE)" == "AMD64" ### Warnings are too many, can't support warnings into errors. diff --git a/win/nmakehlp.c b/win/nmakehlp.c index 21dc36b..65777aa 100644 --- a/win/nmakehlp.c +++ b/win/nmakehlp.c @@ -11,7 +11,7 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. * * ---------------------------------------------------------------------------- - * RCS: @(#) $Id: nmakehlp.c,v 1.21 2007/12/14 02:27:11 patthoyts Exp $ + * RCS: @(#) $Id: nmakehlp.c,v 1.22 2008/05/15 00:04:10 patthoyts Exp $ * ---------------------------------------------------------------------------- */ @@ -23,10 +23,10 @@ #include /* - * This library is required for x64 builds with _some_ versions + * This library is required for x64 builds with _some_ versions of MSVC */ #if defined(_M_IA64) || defined(_M_AMD64) -#if _MSC_FULL_VER > 140000000 && _MSC_FULL_VER <= 140040310 +#if _MSC_VER >= 1400 && _MSC_VER < 1500 #pragma comment(lib, "bufferoverflowU") #endif #endif diff --git a/win/rules.vc b/win/rules.vc index 83a82b9..5b5bc71 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -11,7 +11,7 @@ # Copyright (c) 2003-2007 Patrick Thoyts # #------------------------------------------------------------------------------ -# RCS: @(#) $Id: rules.vc,v 1.35 2007/12/13 15:28:43 dgp Exp $ +# RCS: @(#) $Id: rules.vc,v 1.36 2008/05/15 00:04:11 patthoyts Exp $ #------------------------------------------------------------------------------ !ifndef _RULES_VC @@ -242,6 +242,7 @@ TCL_USE_STATIC_PACKAGES = 0 !if [nmakehlp -f $(OPTS) "threads"] !message *** Doing threads TCL_THREADS = 1 +USE_THREAD_ALLOC= 1 !else TCL_THREADS = 0 !endif @@ -266,7 +267,9 @@ LOIMPACT = 0 !if [nmakehlp -f $(OPTS) "thrdalloc"] !message *** Doing thrdalloc USE_THREAD_ALLOC = 1 -!else +!endif +!if [nmakehlp -f $(OPTS) "tclalloc"] +!message *** Doing thrdalloc USE_THREAD_ALLOC = 0 !endif !if [nmakehlp -f $(OPTS) "unchecked"] -- cgit v0.12