From dabd2355f355abd7d1d58641f6cc496adb1482d1 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 14 Mar 2015 12:56:22 +0100 Subject: Add mutexes everywhere ; spam debug log (sorry) --- src/kernel/user/ipc.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/kernel/user/ipc.c') diff --git a/src/kernel/user/ipc.c b/src/kernel/user/ipc.c index 7f34fdf..308a9c1 100644 --- a/src/kernel/user/ipc.c +++ b/src/kernel/user/ipc.c @@ -83,6 +83,10 @@ fs_handle_pair_t make_channel(bool blocking) { ret.b->node = nb; ret.a->refs = ret.b->refs = 1; 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); return ret; @@ -274,8 +278,11 @@ fs_handle_t* make_shm(size_t size) { h->fs = 0; h->node = n; h->refs = 1; + h->lock = MUTEX_UNLOCKED; h->mode = FM_READ | FM_WRITE | FM_MMAP; + dbg_printf("hREF1s0x%p\n", h); + return h; error: -- cgit v1.2.3