aboutsummaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-13 20:28:54 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-13 20:28:54 +0100
commitcf0b8a52287ee7c747b1d5a7d77abdef1fb46f94 (patch)
treed06ada519003a0794d3107fea1e882b737b5a00c /src/kernel
parente484c92ff08e54e7cbfdb815a5b254507dade003 (diff)
downloadkogata-cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94.tar.gz
kogata-cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94.zip
Reorganize code in preparation for user apps.
Diffstat (limited to 'src/kernel')
-rw-r--r--src/kernel/Makefile2
-rw-r--r--src/kernel/core/thread.c6
2 files changed, 3 insertions, 5 deletions
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)");
}
}