diff options
-rw-r--r-- | lib/libkse/sys/lock.c | 2 | ||||
-rw-r--r-- | lib/libpthread/sys/lock.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkse/sys/lock.c b/lib/libkse/sys/lock.c index e65b552..0f0f5f9 100644 --- a/lib/libkse/sys/lock.c +++ b/lib/libkse/sys/lock.c @@ -183,7 +183,7 @@ _lock_acquire(struct lock *lck, struct lockuser *lu, int prio) atomic_store_rel_ptr(&lu->lu_watchreq->lr_watcher, lu); if ((lck->l_wait == NULL) || ((lck->l_type & LCK_ADAPTIVE) == 0)) { - while (lu->lu_watchreq->lr_locked == 0) + while (lu->lu_watchreq->lr_locked != 0) ; /* spin, then yield? */ } else { /* diff --git a/lib/libpthread/sys/lock.c b/lib/libpthread/sys/lock.c index e65b552..0f0f5f9 100644 --- a/lib/libpthread/sys/lock.c +++ b/lib/libpthread/sys/lock.c @@ -183,7 +183,7 @@ _lock_acquire(struct lock *lck, struct lockuser *lu, int prio) atomic_store_rel_ptr(&lu->lu_watchreq->lr_watcher, lu); if ((lck->l_wait == NULL) || ((lck->l_type & LCK_ADAPTIVE) == 0)) { - while (lu->lu_watchreq->lr_locked == 0) + while (lu->lu_watchreq->lr_locked != 0) ; /* spin, then yield? */ } else { /* |