summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kern/log.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kern/log.c b/kern/log.c
index 121bd74a..9c2c5fca 100644
--- a/kern/log.c
+++ b/kern/log.c
@@ -239,7 +239,7 @@ log_run(void *arg)
index = cbuf_start(&log_cbuf);
for (;;) {
- while (cbuf_size(&log_cbuf) == 0) {
+ while (index == cbuf_end(&log_cbuf)) {
thread_sleep(&log_lock, &log_cbuf, "log_cbuf");
}