|
Message-ID: <1440838216.693.5.camel@dysnomia.u-strasbg.fr> Date: Sat, 29 Aug 2015 10:51:15 +0200 From: Jens Gustedt <Jens.Gustedt@...ia.fr> To: musl@...ts.openwall.com Subject: [PATCH 2/2] make the number of spins tuneable --- src/thread/__wait.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/thread/__wait.c b/src/thread/__wait.c index a93d41d..46501cb 100644 --- a/src/thread/__wait.c +++ b/src/thread/__wait.c @@ -1,8 +1,14 @@ #include "pthread_impl.h" +#ifndef __WAIT_SPINS +# define __WAIT_SPINS 100 +#endif + +int __wait_spins = __WAIT_SPINS; + void __wait(volatile int *addr, volatile int *waiters, int val, int priv) { - int spins=100; + int spins=__wait_spins; if (priv) priv = FUTEX_PRIVATE; while (spins--) { if (*addr==val) a_spin(); -- 2.1.4
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.