From 193821f1117e26ef65b36062a8e5488450a3525c Mon Sep 17 00:00:00 2001 From: Joe Mistachkin Date: Mon, 18 May 2015 18:23:29 +0000 Subject: Adjust tweaks from the previous check-in to prepare for configure detection of usleep(). --- unix/tclUnixThrd.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index dc60dc4..2cb2d87 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -31,7 +31,15 @@ static Tcl_ThreadDataKey dataKey; */ #ifndef TCL_MUTEX_LOCK_SLEEP_TIME -# define TCL_MUTEX_LOCK_SLEEP_TIME (50) +# define TCL_MUTEX_LOCK_SLEEP_TIME (25) +#endif + +/* + * TODO: Remove this section and add the necessary "auto* magic". + */ + +#ifndef HAVE_USLEEP +# define HAVE_USLEEP #endif /* @@ -529,7 +537,7 @@ retry: * "thread-17.11a". Really, what we want here is just * to yield to other threads for a while. */ -#if 1 +#ifdef HAVE_USLEEP usleep(TCL_MUTEX_LOCK_SLEEP_TIME); #else Tcl_Sleep(TCL_MUTEX_LOCK_SLEEP_TIME); -- cgit v0.12