diff options
author | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 20:28:54 +0100 |
---|---|---|
committer | Alex Auvolat <alex.auvolat@ens.fr> | 2015-02-13 20:28:54 +0100 |
commit | cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94 (patch) | |
tree | d06ada519003a0794d3107fea1e882b737b5a00c /src/kernel/core | |
parent | e484c92ff08e54e7cbfdb815a5b254507dade003 (diff) | |
download | kogata-cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94.tar.gz kogata-cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94.zip |
Reorganize code in preparation for user apps.
Diffstat (limited to 'src/kernel/core')
-rw-r--r-- | src/kernel/core/thread.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/kernel/core/thread.c b/src/kernel/core/thread.c index 4ca3f63..cc39eb2 100644 --- a/src/kernel/core/thread.c +++ b/src/kernel/core/thread.c @@ -124,13 +124,11 @@ thread_t *new_thread(entry_t entry, void* data) { for (void* i = stack + PAGE_SIZE; i < stack + KPROC_STACK_SIZE; i += PAGE_SIZE) { uint32_t f = frame_alloc(1); if (f == 0) { - region_free_unmap_free(stack); - free(t); - return 0; + PANIC("TODO (OOM could not create kernel stack for new thread)"); } bool map_ok = pd_map_page(i, f, true); if (!map_ok) { - PANIC("TODO"); + PANIC("TODO (OOM(2) could not create kernel stack for new thread)"); } } |