summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
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)
commit2e3d1fac48ab90dc6870398c1d19cd41361470ec (patch)
tree5f6d30d86a9a7d2a0dd01520b542d14928e790ba /unix/tclUnixThrd.c
parent282b159f3b358fdbf7f1be07ac0e2b8580958b6a (diff)
downloadtcl-2e3d1fac48ab90dc6870398c1d19cd41361470ec.zip
tcl-2e3d1fac48ab90dc6870398c1d19cd41361470ec.tar.gz
tcl-2e3d1fac48ab90dc6870398c1d19cd41361470ec.tar.bz2
Adjust tweaks from the previous check-in to prepare for configure detection of usleep().
Diffstat (limited to 'unix/tclUnixThrd.c')
-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);