diff options
Diffstat (limited to 'src/kernel/user')
-rw-r--r-- | src/kernel/user/ipc.c | 6 | ||||
-rw-r--r-- | src/kernel/user/process.c | 3 | ||||
-rw-r--r-- | src/kernel/user/vfs.c | 14 |
3 files changed, 10 insertions, 13 deletions
diff --git a/src/kernel/user/ipc.c b/src/kernel/user/ipc.c index 2a43da1..0287793 100644 --- a/src/kernel/user/ipc.c +++ b/src/kernel/user/ipc.c @@ -85,8 +85,8 @@ fs_handle_pair_t make_channel(bool blocking) { ret.a->mode = ret.b->mode = FM_READ | FM_WRITE | (blocking ? FM_BLOCKING : 0); ret.a->lock = ret.b->lock = MUTEX_UNLOCKED; - dbg_printf("hREF1c0x%p\n", ret.a); - dbg_printf("hREF1c0x%p\n", ret.b); + if (SPAM_FS_REF) dbg_printf("hREF1c0x%p\n", ret.a); + if (SPAM_FS_REF) dbg_printf("hREF1c0x%p\n", ret.b); return ret; @@ -281,7 +281,7 @@ fs_handle_t* make_shm(size_t size) { h->lock = MUTEX_UNLOCKED; h->mode = FM_READ | FM_WRITE | FM_MMAP; - dbg_printf("hREF1s0x%p\n", h); + if (SPAM_FS_REF) dbg_printf("hREF1s0x%p\n", h); return h; diff --git a/src/kernel/user/process.c b/src/kernel/user/process.c index 320638d..d96b486 100644 --- a/src/kernel/user/process.c +++ b/src/kernel/user/process.c @@ -449,8 +449,6 @@ bool proc_add_fs(process_t *p, fs_t *fs, const char* name) { if (hashtbl_find(p->filesystems, n) != 0) goto end; add_ok = hashtbl_add(p->filesystems, n, fs); - - dbg_printf("Bind %s: 0x%p\n", name, fs); end: mutex_unlock(&p->lock); @@ -601,7 +599,6 @@ error: } bool mmap_file(process_t *proc, fs_handle_t *h, size_t offset, void* addr, size_t size, int mode) { - dbg_printf("Mmap file 0x%p\n", h); if (find_user_region(proc, addr) != 0) return false; if ((uint32_t)addr & (~PAGE_MASK)) return false; diff --git a/src/kernel/user/vfs.c b/src/kernel/user/vfs.c index db01888..fa226f8 100644 --- a/src/kernel/user/vfs.c +++ b/src/kernel/user/vfs.c @@ -50,7 +50,7 @@ fs_t *make_fs(const char* drv_name, fs_handle_t *source, const char* opts) { fs->root->parent = 0; fs->root->children = 0; - dbg_printf("sREF1m0x%p\n", fs); + if (SPAM_FS_REF) dbg_printf("sREF1m0x%p\n", fs); // Look for driver for(fs_driver_t *i = drivers; i != 0; i = i->next) { @@ -88,7 +88,7 @@ fs_t *fs_subfs(fs_t *fs, const char* root, int ok_modes) { subfs->root = new_root; - dbg_printf("sREF1s0x%p\n", fs); + if (SPAM_FS_REF) dbg_printf("sREF1s0x%p\n", fs); return subfs; } @@ -98,7 +98,7 @@ bool fs_add_source(fs_t *fs, fs_handle_t *source, const char* opts) { } void ref_fs(fs_t *fs) { - dbg_printf("sREF++0x%p(%d)\n", fs, fs->refs); + if (SPAM_FS_REF) dbg_printf("sREF++0x%p(%d)\n", fs, fs->refs); mutex_lock(&fs->lock); @@ -108,7 +108,7 @@ void ref_fs(fs_t *fs) { } void unref_fs(fs_t *fs) { - dbg_printf("sREF--0x%p(%d)\n", fs, fs->refs); + if (SPAM_FS_REF) dbg_printf("sREF--0x%p(%d)\n", fs, fs->refs); mutex_lock(&fs->lock); @@ -456,7 +456,7 @@ fs_handle_t* fs_open(fs_t *fs, const char* file, int mode) { h->node = n; h->mode = mode; - dbg_printf("hREF1o0x%p\n", h); + if (SPAM_FS_REF) dbg_printf("hREF1o0x%p\n", h); // our reference to node n is transferred to the file handle mutex_unlock(&n->lock); @@ -471,7 +471,7 @@ error: } void ref_file(fs_handle_t *file) { - dbg_printf("hREF++0x%p(%d)\n", file, file->refs); + if (SPAM_FS_REF) dbg_printf("hREF++0x%p(%d)\n", file, file->refs); mutex_lock(&file->lock); @@ -481,7 +481,7 @@ void ref_file(fs_handle_t *file) { } void unref_file(fs_handle_t *file) { - dbg_printf("hREF--0x%p(%d)\n", file, file->refs); + if (SPAM_FS_REF) dbg_printf("hREF--0x%p(%d)\n", file, file->refs); mutex_lock(&file->lock); |