Style fix to be more like _mtx_lock_sleep(): use 'while (!foo) { ... }'

instead of 'for (;;) { if (foo) break; ... }'.
This commit is contained in:
John Baldwin 2006-06-03 20:44:01 +00:00
parent 1e2e70b1d6
commit f781b5a4bb

View File

@ -596,9 +596,7 @@ _mtx_lock_spin(struct mtx *m, uintptr_t tid, int opts, const char *file,
if (LOCK_LOG_TEST(&m->mtx_object, opts))
CTR1(KTR_LOCK, "_mtx_lock_spin: %p spinning", m);
for (;;) {
if (_obtain_lock(m, tid))
break;
while (!_obtain_lock(m, tid)) {
/* Give interrupts a chance while we spin. */
spinlock_exit();