From 151edb44eea9bf25ec466133e9dbef87bd6b1372 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 13 Mar 2015 18:02:01 +0100 Subject: Add missing mutex-locking in procesc.c ; discovered design fault somewhere. --- src/kernel/core/frame.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/kernel/core/frame.c') diff --git a/src/kernel/core/frame.c b/src/kernel/core/frame.c index 489d010..255abb6 100644 --- a/src/kernel/core/frame.c +++ b/src/kernel/core/frame.c @@ -53,6 +53,7 @@ uint32_t frame_alloc(size_t n) { nused_frames += n; mutex_unlock(&frame_allocator_mutex); + /*dbg_printf("AF 0x%p\n", i * 32 + j);*/ return i * 32 + j; } } @@ -65,6 +66,7 @@ void frame_free(uint32_t base, size_t n) { mutex_lock(&frame_allocator_mutex); for (size_t i = 0; i < n; i++) { + /*dbg_printf("FF 0x%p\n", base + i);*/ uint32_t idx = INDEX_FROM_BIT(base + i); uint32_t ofs = OFFSET_FROM_BIT(base + i); if (frame_bitset[idx] & (0x1 << ofs)) { -- cgit v1.2.3