diff options
author | Alex Auvolat <alex@adnab.me> | 2015-03-13 18:02:01 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2015-03-13 18:02:01 +0100 |
commit | 151edb44eea9bf25ec466133e9dbef87bd6b1372 (patch) | |
tree | 14537daf1be1896a5453dcff21593a4233f1c3b5 /src/kernel/core/frame.c | |
parent | 5bc7fcc00507bbc5ff5bf957a1589209f8495534 (diff) | |
download | kogata-151edb44eea9bf25ec466133e9dbef87bd6b1372.tar.gz kogata-151edb44eea9bf25ec466133e9dbef87bd6b1372.zip |
Add missing mutex-locking in procesc.c ; discovered design fault somewhere.
Diffstat (limited to 'src/kernel/core/frame.c')
-rw-r--r-- | src/kernel/core/frame.c | 2 |
1 files changed, 2 insertions, 0 deletions
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)) { |