summaryrefslogtreecommitdiff
path: root/kern/log.c
diff options
context:
space:
mode:
authorRichard Braun <rbraun@sceen.net>2017-06-10 19:04:03 +0200
committerRichard Braun <rbraun@sceen.net>2017-06-10 19:04:03 +0200
commit0144ca4912123db2788f98b36c4531fc86aeb078 (patch)
tree81b66a6aca937902def975309a54c47b92832d8c /kern/log.c
parent4904e60618fb9335d7e3933dfc42974a798e76ea (diff)
kern/log: fix buffer consumption from log thread
Diffstat (limited to 'kern/log.c')
-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");
}