From aaea926f4d0e4c2d0c9b3b9a886012fa1426fcb5 Mon Sep 17 00:00:00 2001 From: Max Wash Date: Sat, 30 May 2026 10:06:58 +0100 Subject: [PATCH] libc: io: remove verbose log messages --- lib/libc/io/stdio/file.c | 10 ---------- lib/libc/io/stdio/ringbuf.c | 23 ----------------------- 2 files changed, 33 deletions(-) diff --git a/lib/libc/io/stdio/file.c b/lib/libc/io/stdio/file.c index 02b5c7a..848afbb 100644 --- a/lib/libc/io/stdio/file.c +++ b/lib/libc/io/stdio/file.c @@ -22,7 +22,6 @@ static long clear_buf(struct __opaque_file *f) static long refill_buf(struct __opaque_file *f) { - kern_tracef("refill"); char *buf = NULL; size_t available = 0; long r = 0; @@ -108,7 +107,6 @@ void __libc_file_lock(struct __opaque_file *f) { kern_futex_t expected = 0; while (1) { - kern_tracef("lock=%u (%p)", f->f_lock, f); expected = 0; if (__atomic_compare_exchange_n( &f->f_lock, @@ -117,11 +115,9 @@ void __libc_file_lock(struct __opaque_file *f) 0, __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE)) { - kern_tracef("locked=%u (%p)", f->f_lock, f); return; } - kern_tracef("wait=%u (%p)", expected, f); futex_wait(&f->f_lock, 1, FUTEX_PRIVATE); } } @@ -130,12 +126,10 @@ void __libc_file_unlock(struct __opaque_file *f) { f->f_lock = 0; futex_wake(&f->f_lock, 1, FUTEX_PRIVATE); - kern_tracef("unlocked=%u (%p)", f->f_lock, f); } static long read_buf(struct __opaque_file *f, void *out, size_t count) { - kern_tracef("read_buf(%p, %zu)", out, count); char *dest = out; size_t nr_read = 0; long r = 0; @@ -168,7 +162,6 @@ static long read_buf(struct __opaque_file *f, void *out, size_t count) static long read_nobuf(struct __opaque_file *f, void *out, size_t count) { - kern_tracef("read_nobuf"); return read(f->f_fd, out, count); } @@ -286,9 +279,6 @@ static long write_nobuf(struct __opaque_file *f, const void *out, size_t count) long __libc_file_write(struct __opaque_file *f, const void *buf, size_t count) { - if (f->f_lock != 1) { - kern_tracef("file is not locked!!!"); - } long ret = 0; if (f->f_prev != OP_WRITE) { ret = clear_buf(f); diff --git a/lib/libc/io/stdio/ringbuf.c b/lib/libc/io/stdio/ringbuf.c index a88f608..59255e5 100644 --- a/lib/libc/io/stdio/ringbuf.c +++ b/lib/libc/io/stdio/ringbuf.c @@ -45,13 +45,6 @@ int __libc_ringbuf_get_read_buffer( contiguous_capacity = buf->buf_writep - buf->buf_readp; } - kern_tracef( - "OPEN READ: readp=%zu, writep=%zu, max=%zu -> %p cap=%zu", - buf->buf_readp, - buf->buf_writep, - buf->buf_max, - buf->buf_ptr + buf->buf_readp, - contiguous_capacity); *out_len = contiguous_capacity; if (contiguous_capacity == 0) { @@ -74,8 +67,6 @@ void __libc_ringbuf_put_read_buffer( buf->buf_readp = buf->buf_writep = 0; } - kern_tracef("CLOSE READ: %p r=%zu", *bufp, *len); - *bufp = NULL; *len = 0; } @@ -101,14 +92,6 @@ int __libc_ringbuf_get_write_buffer( contiguous_capacity = buf->buf_readp - buf->buf_writep - 1; } - kern_tracef( - "OPEN WRITE: readp=%zu, writep=%zu, max=%zu -> %p cap=%zu", - buf->buf_readp, - buf->buf_writep, - buf->buf_max, - buf->buf_ptr + buf->buf_readp, - contiguous_capacity); - *out_len = contiguous_capacity; if (contiguous_capacity == 0) { @@ -131,12 +114,6 @@ void __libc_ringbuf_put_write_buffer( buf->buf_readp = buf->buf_writep = 0; } - kern_tracef( - "CLOSE WRITE: %p r=%zu (%c)", - *bufp, - *len, - *(char *)(*bufp)); - *bufp = NULL; *len = 0; }