summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2015-05-18 18:23:29 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2015-05-18 18:23:29 (GMT)
commit193821f1117e26ef65b36062a8e5488450a3525c (patch)
tree5f6d30d86a9a7d2a0dd01520b542d14928e790ba /unix
parent1668f8980a9b270a5f1fa1d58069b7e26dc12389 (diff)
downloadtcl-193821f1117e26ef65b36062a8e5488450a3525c.zip
tcl-193821f1117e26ef65b36062a8e5488450a3525c.tar.gz
tcl-193821f1117e26ef65b36062a8e5488450a3525c.tar.bz2
Adjust tweaks from the previous check-in to prepare for configure detection of usleep().
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixThrd.c12
1 files 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);