From cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 13 Feb 2015 20:28:54 +0100 Subject: Reorganize code in preparation for user apps. --- src/kernel/Makefile | 2 +- src/kernel/core/thread.c | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'src/kernel') diff --git a/src/kernel/Makefile b/src/kernel/Makefile index bca1765..6cfa414 100644 --- a/src/kernel/Makefile +++ b/src/kernel/Makefile @@ -4,7 +4,7 @@ OBJ = core/loader.o core/kmain.o core/dbglog.o core/sys.o \ core/frame.o core/paging.o core/region.o core/kmalloc.o \ user/vfs.o user/nullfs.o user/process.o -LIB = ../common/common.lib +LIB = ../common/libc/libc.lib ../common/libkogata/libkogata.lib ../common/libalgo/libalgo.lib CFLAGS = -I ./include -I ../common/include 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)"); } } -- cgit v1.2.3