aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/ipc.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2015-03-14 12:56:22 +0100
committerAlex Auvolat <alex@adnab.me>2015-03-14 12:56:22 +0100
commitdabd2355f355abd7d1d58641f6cc496adb1482d1 (patch)
tree48f674f68b5ec2314d4dd7735af0db0af3408c49 /src/kernel/user/ipc.c
parent151edb44eea9bf25ec466133e9dbef87bd6b1372 (diff)
downloadkogata-dabd2355f355abd7d1d58641f6cc496adb1482d1.tar.gz
kogata-dabd2355f355abd7d1d58641f6cc496adb1482d1.zip
Add mutexes everywhere ; spam debug log (sorry)
Diffstat (limited to 'src/kernel/user/ipc.c')
-rw-r--r--src/kernel/user/ipc.c7
1 files changed, 7 insertions, 0 deletions
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: