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/lib/libkogata/Makefile | 11 +++++++++++ src/lib/libkogata/debug.c | 13 +++++++++++++ src/lib/libkogata/malloc.c | 11 +++++++++++ src/lib/libkogata/start.c | 9 +++++++++ src/lib/libkogata/syscall.c | 10 ++++++++++ 5 files changed, 54 insertions(+) create mode 100644 src/lib/libkogata/Makefile create mode 100644 src/lib/libkogata/debug.c create mode 100644 src/lib/libkogata/malloc.c create mode 100644 src/lib/libkogata/start.c create mode 100644 src/lib/libkogata/syscall.c (limited to 'src/lib/libkogata') diff --git a/src/lib/libkogata/Makefile b/src/lib/libkogata/Makefile new file mode 100644 index 0000000..2649e25 --- /dev/null +++ b/src/lib/libkogata/Makefile @@ -0,0 +1,11 @@ +OBJ = start.o malloc.o debug.o syscall.o + +LIB = ../../common/libkogata/libkogata.lib + +CFLAGS = -I ../include -I ../../common/include + +LDFLAGS = + +OUT = libkogata.lib + +include ../../rules.make diff --git a/src/lib/libkogata/debug.c b/src/lib/libkogata/debug.c new file mode 100644 index 0000000..27c9e28 --- /dev/null +++ b/src/lib/libkogata/debug.c @@ -0,0 +1,13 @@ +#include + +#include + +void panic(const char* msg, const char* file, int line) { + // TODO + while(true); +} + +void panic_assert(const char* assert, const char* file, int line) { + // TODO + while(true); +} diff --git a/src/lib/libkogata/malloc.c b/src/lib/libkogata/malloc.c new file mode 100644 index 0000000..c776cdf --- /dev/null +++ b/src/lib/libkogata/malloc.c @@ -0,0 +1,11 @@ +#include + +void* malloc(size_t size) { + // TODO + return 0; +} + +void free(void* ptr) { + // TODO +} + diff --git a/src/lib/libkogata/start.c b/src/lib/libkogata/start.c new file mode 100644 index 0000000..88a4eb3 --- /dev/null +++ b/src/lib/libkogata/start.c @@ -0,0 +1,9 @@ +#include +#include +#include + +void __libkogata_start() { + // TODO + while(true); +} + diff --git a/src/lib/libkogata/syscall.c b/src/lib/libkogata/syscall.c new file mode 100644 index 0000000..234b9ff --- /dev/null +++ b/src/lib/libkogata/syscall.c @@ -0,0 +1,10 @@ +#include +#include + +void dbg_print(const char* str) { + // TODO +} + +void yield() { + // TODO +} -- cgit v1.2.3