aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-03-03 03:04:55 +0200
committerKimplul <kimi.h.kuparinen@gmail.com>2022-03-03 03:04:55 +0200
commit8bba05b0aefaec7cc2154123f35be9b6cff7f7b3 (patch)
tree4f60e7caff2b515ed56558fc4e6adecc76ca3c55
parentcbfca7a9854061e3a2d59795361fb875827e7c50 (diff)
downloadkmi-8bba05b0aefaec7cc2154123f35be9b6cff7f7b3.tar.gz
kmi-8bba05b0aefaec7cc2154123f35be9b6cff7f7b3.zip
faster deps.mk generation
-rw-r--r--TODO.txt6
-rw-r--r--common/dmem.c2
-rwxr-xr-xscripts/gen-deps5
3 files changed, 9 insertions, 4 deletions
diff --git a/TODO.txt b/TODO.txt
index 7adcceb..24e2ab8 100644
--- a/TODO.txt
+++ b/TODO.txt
@@ -51,4 +51,8 @@ be better for cache locality.
binary size?
+ Add in purely virtual memory pages, i.e. stuff that shouldn't free physical
memory when the memory page is freed, for example if two processes share the
-same memory
+same memory (started on it)
++ Arches will need to implement timers. All in all, in kernel there should be
+SMP, IPC, timers a memory manager, everything else in userspace.
++ Choose between allowing the process manager to interrupt other cpus and each
+cpu starts its own process manager with a timer of some sort?
diff --git a/common/dmem.c b/common/dmem.c
index 2d3354b..48bcefd 100644
--- a/common/dmem.c
+++ b/common/dmem.c
@@ -72,7 +72,7 @@ stat_t free_devmem(struct tcb *t, vm_t dev_start)
struct mem_region *m = 0;
if(dev_paddr < __pre_top)
m = find_used_region(&pre_ram, dev_paddr);
-
+
if(dev_paddr > __post_base)
m = find_used_region(&post_ram, dev_paddr);
diff --git a/scripts/gen-deps b/scripts/gen-deps
index bcfb15d..7c847fb 100755
--- a/scripts/gen-deps
+++ b/scripts/gen-deps
@@ -4,8 +4,6 @@ gencommon () {
lint="build/${s%.*}${1}.l"
dep="build/${s%.*}${1}.d"
obj="build/${s%.*}${1}"
-
- mkdir -p $(dirname ${dep})
echo "${dep}:" >> deps.mk
echo "include ${dep}" >> deps.mk
@@ -36,6 +34,9 @@ case "${1}" in
func=genlink
esac
+# create all subdirectories
+mkdir -p $(echo "${2}" | xargs dirname | uniq | sed 's|^|build/|g')
+
for s in ${2}
do
${func} ${suffix}