summaryrefslogtreecommitdiff
path: root/nptl
diff options
context:
space:
mode:
Diffstat (limited to 'nptl')
-rw-r--r--nptl/pthread_mutex_lock.c6
-rw-r--r--nptl/pthread_mutex_timedlock.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/nptl/pthread_mutex_lock.c b/nptl/pthread_mutex_lock.c
index 96075129b8..9a3b46624d 100644
--- a/nptl/pthread_mutex_lock.c
+++ b/nptl/pthread_mutex_lock.c
@@ -23,6 +23,7 @@
#include <sys/param.h>
#include <not-cancel.h>
#include "pthreadP.h"
+#include <atomic.h>
#include <lowlevellock.h>
#include <stap-probe.h>
@@ -135,10 +136,7 @@ __pthread_mutex_lock (mutex)
LLL_MUTEX_LOCK (mutex);
break;
}
-
-#ifdef BUSY_WAIT_NOP
- BUSY_WAIT_NOP;
-#endif
+ atomic_spin_nop ();
}
while (LLL_MUTEX_TRYLOCK (mutex) != 0);
diff --git a/nptl/pthread_mutex_timedlock.c b/nptl/pthread_mutex_timedlock.c
index 109a46a84d..f0fb03e90b 100644
--- a/nptl/pthread_mutex_timedlock.c
+++ b/nptl/pthread_mutex_timedlock.c
@@ -22,6 +22,7 @@
#include <sys/param.h>
#include <sys/time.h>
#include "pthreadP.h"
+#include <atomic.h>
#include <lowlevellock.h>
#include <not-cancel.h>
@@ -125,10 +126,7 @@ pthread_mutex_timedlock (mutex, abstime)
PTHREAD_MUTEX_PSHARED (mutex));
break;
}
-
-#ifdef BUSY_WAIT_NOP
- BUSY_WAIT_NOP;
-#endif
+ atomic_spin_nop ();
}
while (lll_trylock (mutex->__data.__lock) != 0);