diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-25 14:41:26 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-25 14:41:26 (GMT) |
commit | 6cf1f7bacfe7e787c6468eed2b41194dd1c6e333 (patch) | |
tree | 3e0aa363fe324f88ce36cf4860d0eb3c0f5bfb19 /unix | |
parent | a4933e22d0b56bf07cf35cb90eb1f6fd6c9e48cb (diff) | |
parent | 77cc7b40aa68fe4c7ef545f76495ba18c4ace487 (diff) | |
download | tcl-6cf1f7bacfe7e787c6468eed2b41194dd1c6e333.zip tcl-6cf1f7bacfe7e787c6468eed2b41194dd1c6e333.tar.gz tcl-6cf1f7bacfe7e787c6468eed2b41194dd1c6e333.tar.bz2 |
- Undo unix notifier changes: too risky at this moment.
- Merge trunk
- (cherry-pick from dhr-micro-optimization): Micro-optimization: remove double checked lock from TclGetAllocCache in favour of initialization in TclInitSubsystems
Diffstat (limited to 'unix')
-rw-r--r-- | unix/Makefile.in | 130 | ||||
-rwxr-xr-x | unix/configure | 2 | ||||
-rw-r--r-- | unix/tcl.m4 | 2 | ||||
-rw-r--r-- | unix/tclUnixNotfy.c | 21 | ||||
-rw-r--r-- | unix/tclUnixThrd.c | 52 |
5 files changed, 88 insertions, 119 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 570bce0..897dd1f 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -584,7 +584,7 @@ MAC_OSX_SRCS = \ CYGWIN_SRCS = \ $(TOP_DIR)/win/tclWinError.c -DTRACE_HDR = tclDTrace.h +DTRACE_HDR = @DTRACE_HDR@ DTRACE_SRC = $(GENERIC_DIR)/tclDTrace.d @@ -1351,196 +1351,196 @@ tclThreadTest.o: $(GENERIC_DIR)/tclThreadTest.c tclTomMathInterface.o: $(GENERIC_DIR)/tclTomMathInterface.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tclTomMathInterface.c -bncore.o: $(TOMMATH_DIR)/bncore.c $(MATHHDRS) +bncore.o: $(TOMMATH_DIR)/bncore.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bncore.c -bn_reverse.o: $(TOMMATH_DIR)/bn_reverse.c $(MATHHDRS) +bn_reverse.o: $(TOMMATH_DIR)/bn_reverse.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_reverse.c -bn_fast_s_mp_mul_digs.o: $(TOMMATH_DIR)/bn_fast_s_mp_mul_digs.c $(MATHHDRS) +bn_fast_s_mp_mul_digs.o: $(TOMMATH_DIR)/bn_fast_s_mp_mul_digs.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_fast_s_mp_mul_digs.c -bn_fast_s_mp_sqr.o: $(TOMMATH_DIR)/bn_fast_s_mp_sqr.c $(MATHHDRS) +bn_fast_s_mp_sqr.o: $(TOMMATH_DIR)/bn_fast_s_mp_sqr.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_fast_s_mp_sqr.c -bn_mp_add.o: $(TOMMATH_DIR)/bn_mp_add.c $(MATHHDRS) +bn_mp_add.o: $(TOMMATH_DIR)/bn_mp_add.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_add.c -bn_mp_add_d.o: $(TOMMATH_DIR)/bn_mp_add_d.c $(MATHHDRS) +bn_mp_add_d.o: $(TOMMATH_DIR)/bn_mp_add_d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_add_d.c -bn_mp_and.o: $(TOMMATH_DIR)/bn_mp_and.c $(MATHHDRS) +bn_mp_and.o: $(TOMMATH_DIR)/bn_mp_and.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_and.c -bn_mp_clamp.o: $(TOMMATH_DIR)/bn_mp_clamp.c $(MATHHDRS) +bn_mp_clamp.o: $(TOMMATH_DIR)/bn_mp_clamp.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_clamp.c -bn_mp_clear.o: $(TOMMATH_DIR)/bn_mp_clear.c $(MATHHDRS) +bn_mp_clear.o: $(TOMMATH_DIR)/bn_mp_clear.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_clear.c -bn_mp_clear_multi.o: $(TOMMATH_DIR)/bn_mp_clear_multi.c $(MATHHDRS) +bn_mp_clear_multi.o: $(TOMMATH_DIR)/bn_mp_clear_multi.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_clear_multi.c -bn_mp_cmp.o: $(TOMMATH_DIR)/bn_mp_cmp.c $(MATHHDRS) +bn_mp_cmp.o: $(TOMMATH_DIR)/bn_mp_cmp.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_cmp.c -bn_mp_cmp_d.o: $(TOMMATH_DIR)/bn_mp_cmp_d.c $(MATHHDRS) +bn_mp_cmp_d.o: $(TOMMATH_DIR)/bn_mp_cmp_d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_cmp_d.c -bn_mp_cmp_mag.o: $(TOMMATH_DIR)/bn_mp_cmp_mag.c $(MATHHDRS) +bn_mp_cmp_mag.o: $(TOMMATH_DIR)/bn_mp_cmp_mag.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_cmp_mag.c -bn_mp_cnt_lsb.o: $(TOMMATH_DIR)/bn_mp_cnt_lsb.c $(MATHHDRS) +bn_mp_cnt_lsb.o: $(TOMMATH_DIR)/bn_mp_cnt_lsb.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_cnt_lsb.c -bn_mp_copy.o: $(TOMMATH_DIR)/bn_mp_copy.c $(MATHHDRS) +bn_mp_copy.o: $(TOMMATH_DIR)/bn_mp_copy.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_copy.c -bn_mp_count_bits.o: $(TOMMATH_DIR)/bn_mp_count_bits.c $(MATHHDRS) +bn_mp_count_bits.o: $(TOMMATH_DIR)/bn_mp_count_bits.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_count_bits.c -bn_mp_div.o: $(TOMMATH_DIR)/bn_mp_div.c $(MATHHDRS) +bn_mp_div.o: $(TOMMATH_DIR)/bn_mp_div.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_div.c -bn_mp_div_d.o: $(TOMMATH_DIR)/bn_mp_div_d.c $(MATHHDRS) +bn_mp_div_d.o: $(TOMMATH_DIR)/bn_mp_div_d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_div_d.c -bn_mp_div_2.o: $(TOMMATH_DIR)/bn_mp_div_2.c $(MATHHDRS) +bn_mp_div_2.o: $(TOMMATH_DIR)/bn_mp_div_2.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_div_2.c -bn_mp_div_2d.o: $(TOMMATH_DIR)/bn_mp_div_2d.c $(MATHHDRS) +bn_mp_div_2d.o: $(TOMMATH_DIR)/bn_mp_div_2d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_div_2d.c -bn_mp_div_3.o: $(TOMMATH_DIR)/bn_mp_div_3.c $(MATHHDRS) +bn_mp_div_3.o: $(TOMMATH_DIR)/bn_mp_div_3.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_div_3.c -bn_mp_exch.o: $(TOMMATH_DIR)/bn_mp_exch.c $(MATHHDRS) +bn_mp_exch.o: $(TOMMATH_DIR)/bn_mp_exch.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_exch.c -bn_mp_expt_d.o: $(TOMMATH_DIR)/bn_mp_expt_d.c $(MATHHDRS) +bn_mp_expt_d.o: $(TOMMATH_DIR)/bn_mp_expt_d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_expt_d.c -bn_mp_grow.o: $(TOMMATH_DIR)/bn_mp_grow.c $(MATHHDRS) +bn_mp_grow.o: $(TOMMATH_DIR)/bn_mp_grow.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_grow.c -bn_mp_init.o: $(TOMMATH_DIR)/bn_mp_init.c $(MATHHDRS) +bn_mp_init.o: $(TOMMATH_DIR)/bn_mp_init.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init.c -bn_mp_init_copy.o: $(TOMMATH_DIR)/bn_mp_init_copy.c $(MATHHDRS) +bn_mp_init_copy.o: $(TOMMATH_DIR)/bn_mp_init_copy.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_copy.c -bn_mp_init_multi.o: $(TOMMATH_DIR)/bn_mp_init_multi.c $(MATHHDRS) +bn_mp_init_multi.o: $(TOMMATH_DIR)/bn_mp_init_multi.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_multi.c -bn_mp_init_set.o: $(TOMMATH_DIR)/bn_mp_init_set.c $(MATHHDRS) +bn_mp_init_set.o: $(TOMMATH_DIR)/bn_mp_init_set.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_set.c -bn_mp_init_set_int.o: $(TOMMATH_DIR)/bn_mp_init_set_int.c $(MATHHDRS) +bn_mp_init_set_int.o: $(TOMMATH_DIR)/bn_mp_init_set_int.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_set_int.c -bn_mp_init_size.o:$(TOMMATH_DIR)/bn_mp_init_size.c $(MATHHDRS) +bn_mp_init_size.o:$(TOMMATH_DIR)/bn_mp_init_size.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_init_size.c -bn_mp_karatsuba_mul.o: $(TOMMATH_DIR)/bn_mp_karatsuba_mul.c $(MATHHDRS) +bn_mp_karatsuba_mul.o: $(TOMMATH_DIR)/bn_mp_karatsuba_mul.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_karatsuba_mul.c -bn_mp_karatsuba_sqr.o: $(TOMMATH_DIR)/bn_mp_karatsuba_sqr.c $(MATHHDRS) +bn_mp_karatsuba_sqr.o: $(TOMMATH_DIR)/bn_mp_karatsuba_sqr.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_karatsuba_sqr.c -bn_mp_lshd.o: $(TOMMATH_DIR)/bn_mp_lshd.c $(MATHHDRS) +bn_mp_lshd.o: $(TOMMATH_DIR)/bn_mp_lshd.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_lshd.c -bn_mp_mod.o: $(TOMMATH_DIR)/bn_mp_mod.c $(MATHHDRS) +bn_mp_mod.o: $(TOMMATH_DIR)/bn_mp_mod.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_mod.c -bn_mp_mod_2d.o: $(TOMMATH_DIR)/bn_mp_mod_2d.c $(MATHHDRS) +bn_mp_mod_2d.o: $(TOMMATH_DIR)/bn_mp_mod_2d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_mod_2d.c -bn_mp_mul.o: $(TOMMATH_DIR)/bn_mp_mul.c $(MATHHDRS) +bn_mp_mul.o: $(TOMMATH_DIR)/bn_mp_mul.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_mul.c -bn_mp_mul_2.o: $(TOMMATH_DIR)/bn_mp_mul_2.c $(MATHHDRS) +bn_mp_mul_2.o: $(TOMMATH_DIR)/bn_mp_mul_2.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_mul_2.c -bn_mp_mul_2d.o: $(TOMMATH_DIR)/bn_mp_mul_2d.c $(MATHHDRS) +bn_mp_mul_2d.o: $(TOMMATH_DIR)/bn_mp_mul_2d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_mul_2d.c -bn_mp_mul_d.o: $(TOMMATH_DIR)/bn_mp_mul_d.c $(MATHHDRS) +bn_mp_mul_d.o: $(TOMMATH_DIR)/bn_mp_mul_d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_mul_d.c -bn_mp_neg.o: $(TOMMATH_DIR)/bn_mp_neg.c $(MATHHDRS) +bn_mp_neg.o: $(TOMMATH_DIR)/bn_mp_neg.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_neg.c -bn_mp_or.o: $(TOMMATH_DIR)/bn_mp_or.c $(MATHHDRS) +bn_mp_or.o: $(TOMMATH_DIR)/bn_mp_or.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_or.c -bn_mp_radix_size.o: $(TOMMATH_DIR)/bn_mp_radix_size.c $(MATHHDRS) +bn_mp_radix_size.o: $(TOMMATH_DIR)/bn_mp_radix_size.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_radix_size.c -bn_mp_radix_smap.o: $(TOMMATH_DIR)/bn_mp_radix_smap.c $(MATHHDRS) +bn_mp_radix_smap.o: $(TOMMATH_DIR)/bn_mp_radix_smap.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_radix_smap.c -bn_mp_read_radix.o: $(TOMMATH_DIR)/bn_mp_read_radix.c $(MATHHDRS) +bn_mp_read_radix.o: $(TOMMATH_DIR)/bn_mp_read_radix.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_read_radix.c -bn_mp_rshd.o: $(TOMMATH_DIR)/bn_mp_rshd.c $(MATHHDRS) +bn_mp_rshd.o: $(TOMMATH_DIR)/bn_mp_rshd.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_rshd.c -bn_mp_set.o: $(TOMMATH_DIR)/bn_mp_set.c $(MATHHDRS) +bn_mp_set.o: $(TOMMATH_DIR)/bn_mp_set.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_set.c -bn_mp_set_int.o: $(TOMMATH_DIR)/bn_mp_set_int.c $(MATHHDRS) +bn_mp_set_int.o: $(TOMMATH_DIR)/bn_mp_set_int.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_set_int.c -bn_mp_shrink.o: $(TOMMATH_DIR)/bn_mp_shrink.c $(MATHHDRS) +bn_mp_shrink.o: $(TOMMATH_DIR)/bn_mp_shrink.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_shrink.c -bn_mp_sqr.o: $(TOMMATH_DIR)/bn_mp_sqr.c $(MATHHDRS) +bn_mp_sqr.o: $(TOMMATH_DIR)/bn_mp_sqr.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_sqr.c -bn_mp_sqrt.o: $(TOMMATH_DIR)/bn_mp_sqrt.c $(MATHHDRS) +bn_mp_sqrt.o: $(TOMMATH_DIR)/bn_mp_sqrt.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_sqrt.c -bn_mp_sub.o: $(TOMMATH_DIR)/bn_mp_sub.c $(MATHHDRS) +bn_mp_sub.o: $(TOMMATH_DIR)/bn_mp_sub.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_sub.c -bn_mp_sub_d.o: $(TOMMATH_DIR)/bn_mp_sub_d.c $(MATHHDRS) +bn_mp_sub_d.o: $(TOMMATH_DIR)/bn_mp_sub_d.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_sub_d.c -bn_mp_to_unsigned_bin.o: $(TOMMATH_DIR)/bn_mp_to_unsigned_bin.c $(MATHHDRS) +bn_mp_to_unsigned_bin.o: $(TOMMATH_DIR)/bn_mp_to_unsigned_bin.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_to_unsigned_bin.c -bn_mp_to_unsigned_bin_n.o: $(TOMMATH_DIR)/bn_mp_to_unsigned_bin_n.c $(MATHHDRS) +bn_mp_to_unsigned_bin_n.o: $(TOMMATH_DIR)/bn_mp_to_unsigned_bin_n.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_to_unsigned_bin_n.c -bn_mp_toom_mul.o: $(TOMMATH_DIR)/bn_mp_toom_mul.c $(MATHHDRS) +bn_mp_toom_mul.o: $(TOMMATH_DIR)/bn_mp_toom_mul.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_toom_mul.c -bn_mp_toom_sqr.o: $(TOMMATH_DIR)/bn_mp_toom_sqr.c $(MATHHDRS) +bn_mp_toom_sqr.o: $(TOMMATH_DIR)/bn_mp_toom_sqr.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_toom_sqr.c -bn_mp_toradix_n.o: $(TOMMATH_DIR)/bn_mp_toradix_n.c $(MATHHDRS) +bn_mp_toradix_n.o: $(TOMMATH_DIR)/bn_mp_toradix_n.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_toradix_n.c -bn_mp_unsigned_bin_size.o: $(TOMMATH_DIR)/bn_mp_unsigned_bin_size.c $(MATHHDRS) +bn_mp_unsigned_bin_size.o: $(TOMMATH_DIR)/bn_mp_unsigned_bin_size.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_unsigned_bin_size.c -bn_mp_xor.o: $(TOMMATH_DIR)/bn_mp_xor.c $(MATHHDRS) +bn_mp_xor.o: $(TOMMATH_DIR)/bn_mp_xor.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_xor.c -bn_mp_zero.o: $(TOMMATH_DIR)/bn_mp_zero.c $(MATHHDRS) +bn_mp_zero.o: $(TOMMATH_DIR)/bn_mp_zero.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_zero.c -bn_s_mp_add.o: $(TOMMATH_DIR)/bn_s_mp_add.c $(MATHHDRS) +bn_s_mp_add.o: $(TOMMATH_DIR)/bn_s_mp_add.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_add.c -bn_s_mp_mul_digs.o: $(TOMMATH_DIR)/bn_s_mp_mul_digs.c $(MATHHDRS) +bn_s_mp_mul_digs.o: $(TOMMATH_DIR)/bn_s_mp_mul_digs.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_mul_digs.c -bn_s_mp_sqr.o: $(TOMMATH_DIR)/bn_s_mp_sqr.c $(MATHHDRS) +bn_s_mp_sqr.o: $(TOMMATH_DIR)/bn_s_mp_sqr.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_sqr.c -bn_s_mp_sub.o: $(TOMMATH_DIR)/bn_s_mp_sub.c $(MATHHDRS) +bn_s_mp_sub.o: $(TOMMATH_DIR)/bn_s_mp_sub.c $(MATHHDRS) $(DTRACE_HDR) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_s_mp_sub.c tclUnixChan.o: $(UNIX_DIR)/tclUnixChan.c $(IOHDR) diff --git a/unix/configure b/unix/configure index 3f9aa13..e999455 100755 --- a/unix/configure +++ b/unix/configure @@ -4985,7 +4985,7 @@ fi if test "$GCC" = yes; then : CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall" + CFLAGS_WARNING="-Wall -Wsign-compare -Wdeclaration-after-statement" else diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 57d8ff0..f5aa84e 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1096,7 +1096,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g AS_IF([test "$GCC" = yes], [ CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall" + CFLAGS_WARNING="-Wall -Wsign-compare -Wdeclaration-after-statement" ], [ CFLAGS_OPTIMIZE=-O CFLAGS_WARNING="" diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index ca6a7ef..1457890 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -152,6 +152,7 @@ static int triggerPipe = -1; * The notifierMutex locks access to all of the global notifier state. */ +pthread_mutex_t notifierInitMutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t notifierMutex = PTHREAD_MUTEX_INITIALIZER; /* * The following static indicates if the notifier thread is running. @@ -280,7 +281,7 @@ static void StartNotifierThread(const char *proc) { if (!notifierThreadRunning) { - TclpMasterLock(); + pthread_mutex_lock(¬ifierInitMutex); if (!notifierThreadRunning) { if (TclpThreadCreate(¬ifierThread, NotifierThreadProc, NULL, TCL_THREAD_STACK_DEFAULT, TCL_THREAD_JOINABLE) != TCL_OK) { @@ -299,7 +300,7 @@ StartNotifierThread(const char *proc) notifierThreadRunning = 1; } - TclpMasterUnlock(); + pthread_mutex_unlock(¬ifierInitMutex); } } #endif /* TCL_THREADS */ @@ -361,7 +362,7 @@ Tcl_InitNotifier(void) tsdPtr->waitCVinitialized = 1; } - TclpMasterLock(); + pthread_mutex_lock(¬ifierInitMutex); #if defined(HAVE_PTHREAD_ATFORK) /* * Install pthread_atfork handlers to clean up the notifier in the @@ -380,7 +381,7 @@ Tcl_InitNotifier(void) notifierCount++; - TclpMasterUnlock(); + pthread_mutex_unlock(¬ifierInitMutex); #endif /* TCL_THREADS */ return tsdPtr; @@ -416,7 +417,7 @@ Tcl_FinalizeNotifier( #ifdef TCL_THREADS ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey); - TclpMasterLock(); + pthread_mutex_lock(¬ifierInitMutex); notifierCount--; /* @@ -461,7 +462,7 @@ Tcl_FinalizeNotifier( #endif /* __CYGWIN__ */ tsdPtr->waitCVinitialized = 0; - TclpMasterUnlock(); + pthread_mutex_unlock(¬ifierInitMutex); #endif /* TCL_THREADS */ } } @@ -1367,7 +1368,7 @@ static void AtForkPrepare(void) { #if RESET_ATFORK_MUTEX == 0 - TclpMasterLock(); + pthread_mutex_lock(¬ifierInitMutex); #endif } @@ -1391,7 +1392,7 @@ static void AtForkParent(void) { #if RESET_ATFORK_MUTEX == 0 - TclpMasterUnlock(); + pthread_mutex_unlock(¬ifierInitMutex); #endif } @@ -1418,9 +1419,9 @@ AtForkChild(void) pthread_cond_destroy(¬ifierCV); } #if RESET_ATFORK_MUTEX == 0 - TclpMasterUnlock(); + pthread_mutex_unlock(¬ifierInitMutex); #else - TclpMasterReset(); + pthread_mutex_init(¬ifierInitMutex, NULL); pthread_mutex_init(¬ifierMutex, NULL); #endif pthread_cond_init(¬ifierCV, NULL); diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index 4130993..070a107 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -357,31 +357,6 @@ TclpMasterUnlock(void) /* *---------------------------------------------------------------------- * - * TclpMasterReset - * - * This procedure is used to reset a lock that serializes creation and - * finalization of synchronization objects. - * - * Results: - * None. - * - * Side effects: - * Reset the master mutex. - * - *---------------------------------------------------------------------- - */ - -void -TclpMasterReset(void) -{ -#ifdef TCL_THREADS - pthread_mutex_init(&masterLock, NULL); -#endif -} - -/* - *---------------------------------------------------------------------- - * * Tcl_GetAllocMutex * * This procedure returns a pointer to a statically initialized mutex for @@ -698,7 +673,6 @@ TclpInetNtoa( */ #ifdef USE_THREAD_ALLOC -static volatile int initialized = 0; static pthread_key_t key; typedef struct allocMutex { @@ -745,29 +719,23 @@ TclpFreeAllocCache( TclFreeAllocCache(ptr); pthread_setspecific(key, NULL); - - } else if (initialized) { - /* - * Called by us in TclFinalizeThreadAlloc() during the library - * finalization initiated from Tcl_Finalize() - */ - + + } else { pthread_key_delete(key); - initialized = 0; } } +void +TclpInitThreadAlloc(void) +{ + pthread_mutex_lock(allocLockPtr); + pthread_key_create(&key, TclpFreeAllocCache); + pthread_mutex_unlock(allocLockPtr); +} + void * TclpGetAllocCache(void) { - if (!initialized) { - pthread_mutex_lock(allocLockPtr); - if (!initialized) { - pthread_key_create(&key, TclpFreeAllocCache); - initialized = 1; - } - pthread_mutex_unlock(allocLockPtr); - } return pthread_getspecific(key); } |