summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/kern/kern_mutex.c3
-rw-r--r--sys/kern/kern_rwlock.c8
2 files changed, 0 insertions, 11 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c
index 17c72eb..fc342c5 100644
--- a/sys/kern/kern_mutex.c
+++ b/sys/kern/kern_mutex.c
@@ -393,7 +393,6 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t tid, int opts, const char *file,
*/
if (v == MTX_UNOWNED) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
@@ -408,7 +407,6 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t tid, int opts, const char *file,
owner = (struct thread *)(v & ~MTX_FLAGMASK);
if (TD_IS_RUNNING(owner)) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
#endif
@@ -421,7 +419,6 @@ _mtx_lock_sleep(struct mtx *m, uintptr_t tid, int opts, const char *file,
if ((v & MTX_CONTESTED) == 0 &&
!atomic_cmpset_ptr(&m->mtx_lock, v, v | MTX_CONTESTED)) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
diff --git a/sys/kern/kern_rwlock.c b/sys/kern/kern_rwlock.c
index cc5f4f132..28fccce 100644
--- a/sys/kern/kern_rwlock.c
+++ b/sys/kern/kern_rwlock.c
@@ -350,7 +350,6 @@ _rw_rlock(struct rwlock *rw, const char *file, int line)
(void *)(v + RW_ONE_READER));
break;
}
- cpu_spinwait();
continue;
}
lock_profile_obtain_lock_failed(&rw->lock_object,
@@ -406,7 +405,6 @@ _rw_rlock(struct rwlock *rw, const char *file, int line)
v = rw->rw_lock;
if (RW_CAN_READ(v)) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
@@ -422,7 +420,6 @@ _rw_rlock(struct rwlock *rw, const char *file, int line)
owner = (struct thread *)RW_OWNER(v);
if (TD_IS_RUNNING(owner)) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
}
@@ -443,7 +440,6 @@ _rw_rlock(struct rwlock *rw, const char *file, int line)
if (!atomic_cmpset_ptr(&rw->rw_lock, v,
v | RW_LOCK_READ_WAITERS)) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
if (LOCK_LOG_TEST(&rw->lock_object, 0))
@@ -695,7 +691,6 @@ _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line)
if (!(v & RW_LOCK_WRITE_SPINNER)) {
if (!atomic_cmpset_ptr(&rw->rw_lock, v,
v | RW_LOCK_WRITE_SPINNER)) {
- cpu_spinwait();
continue;
}
}
@@ -727,7 +722,6 @@ _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line)
owner = (struct thread *)RW_OWNER(v);
if (TD_IS_RUNNING(owner)) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
}
@@ -750,7 +744,6 @@ _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line)
break;
}
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
/*
@@ -762,7 +755,6 @@ _rw_wlock_hard(struct rwlock *rw, uintptr_t tid, const char *file, int line)
if (!atomic_cmpset_ptr(&rw->rw_lock, v,
v | RW_LOCK_WRITE_WAITERS)) {
turnstile_cancel(ts);
- cpu_spinwait();
continue;
}
if (LOCK_LOG_TEST(&rw->lock_object, 0))
OpenPOWER on IntegriCloud