diff options
author | jhb <jhb@FreeBSD.org> | 2006-06-03 20:44:01 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2006-06-03 20:44:01 +0000 |
commit | 4f9dae34b792b8e0e7862e2ac3fef12ff2c0668a (patch) | |
tree | 9590b85a4f0aceea9704ddcfb2b023653667557d | |
parent | 23299c192f41ea470b6da567c41e4e737d51a6fb (diff) | |
download | FreeBSD-src-4f9dae34b792b8e0e7862e2ac3fef12ff2c0668a.zip FreeBSD-src-4f9dae34b792b8e0e7862e2ac3fef12ff2c0668a.tar.gz |
Style fix to be more like _mtx_lock_sleep(): use 'while (!foo) { ... }'
instead of 'for (;;) { if (foo) break; ... }'.
-rw-r--r-- | sys/kern/kern_mutex.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 0131a39..6c5b2a3 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -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(); |