aboutsummaryrefslogtreecommitdiff
path: root/src/common
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/common
parente484c92ff08e54e7cbfdb815a5b254507dade003 (diff)
downloadkogata-cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94.tar.gz
kogata-cf0b8a52287ee7c747b1d5a7d77abdef1fb46f94.zip
Reorganize code in preparation for user apps.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Makefile11
-rw-r--r--src/common/README9
-rw-r--r--src/common/libalgo/Makefile11
-rw-r--r--src/common/libalgo/hashtbl.c (renamed from src/common/hashtbl.c)0
-rw-r--r--src/common/libc/Makefile11
-rw-r--r--src/common/libc/printf.c (renamed from src/common/printf.c)0
-rw-r--r--src/common/libc/string.c (renamed from src/common/string.c)0
-rw-r--r--src/common/libkogata/Makefile11
-rw-r--r--src/common/libkogata/mutex.c (renamed from src/common/mutex.c)0
-rw-r--r--src/common/libkogata/slab_alloc.c (renamed from src/common/slab_alloc.c)0
10 files changed, 41 insertions, 12 deletions
diff --git a/src/common/Makefile b/src/common/Makefile
deleted file mode 100644
index 40b8ba9..0000000
--- a/src/common/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-OBJ = string.o printf.o slab_alloc.o mutex.o hashtbl.o
-
-LIB =
-
-CFLAGS = -I ./include
-
-LDFLAGS =
-
-OUT = common.lib
-
-include ../rules.make
diff --git a/src/common/README b/src/common/README
index e40df40..7e3e1f7 100644
--- a/src/common/README
+++ b/src/common/README
@@ -1,5 +1,9 @@
This directory contains the library functions common to userland
-and kernel code.
+and kernel code, for the three basic libraries of the system :
+
+- libkogata : memory allocation, system functions
+- libc : (partial)implementation of standard libc functions
+- libalgo : usefull data structures
It relies on a few functions being exported :
@@ -14,6 +18,9 @@ These function are supposed to be defined in the code that calls
the common functions. The headers for these functions are to be
found in `assert.h` and `malloc.h`.
+In kernel code, these functions are defined somewhere in the kernel.
+In user code, these functions are defined in the user part of libkogata.
+
Panic and panic_assert end the execution of the current program
(or of the kernel when in kernel-mode).
diff --git a/src/common/libalgo/Makefile b/src/common/libalgo/Makefile
new file mode 100644
index 0000000..3e021c4
--- /dev/null
+++ b/src/common/libalgo/Makefile
@@ -0,0 +1,11 @@
+OBJ = hashtbl.o
+
+LIB =
+
+CFLAGS = -I ../include
+
+LDFLAGS =
+
+OUT = libalgo.lib
+
+include ../../rules.make
diff --git a/src/common/hashtbl.c b/src/common/libalgo/hashtbl.c
index b87bcef..b87bcef 100644
--- a/src/common/hashtbl.c
+++ b/src/common/libalgo/hashtbl.c
diff --git a/src/common/libc/Makefile b/src/common/libc/Makefile
new file mode 100644
index 0000000..54fa9f1
--- /dev/null
+++ b/src/common/libc/Makefile
@@ -0,0 +1,11 @@
+OBJ = string.o printf.o
+
+LIB =
+
+CFLAGS = -I ../include
+
+LDFLAGS =
+
+OUT = libc.lib
+
+include ../../rules.make
diff --git a/src/common/printf.c b/src/common/libc/printf.c
index 68e08d8..68e08d8 100644
--- a/src/common/printf.c
+++ b/src/common/libc/printf.c
diff --git a/src/common/string.c b/src/common/libc/string.c
index f6c27b4..f6c27b4 100644
--- a/src/common/string.c
+++ b/src/common/libc/string.c
diff --git a/src/common/libkogata/Makefile b/src/common/libkogata/Makefile
new file mode 100644
index 0000000..ea70be5
--- /dev/null
+++ b/src/common/libkogata/Makefile
@@ -0,0 +1,11 @@
+OBJ = slab_alloc.o mutex.o
+
+LIB =
+
+CFLAGS = -I ../include
+
+LDFLAGS =
+
+OUT = libkogata.lib
+
+include ../../rules.make
diff --git a/src/common/mutex.c b/src/common/libkogata/mutex.c
index b345ee5..b345ee5 100644
--- a/src/common/mutex.c
+++ b/src/common/libkogata/mutex.c
diff --git a/src/common/slab_alloc.c b/src/common/libkogata/slab_alloc.c
index 714c49f..714c49f 100644
--- a/src/common/slab_alloc.c
+++ b/src/common/libkogata/slab_alloc.c