libc: io: remove verbose log messages
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user