aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/user/process.c
diff options
context:
space:
mode:
authorAlex Auvolat <alex.auvolat@ens.fr>2015-02-13 21:52:48 +0100
committerAlex Auvolat <alex.auvolat@ens.fr>2015-02-13 21:52:48 +0100
commit47e6cd42f0744f6c04b8347093f6549339a856c9 (patch)
treec91fc43178d136c2aa0f093087ba8cfb4e90bdae /src/kernel/user/process.c
parentcf0b8a52287ee7c747b1d5a7d77abdef1fb46f94 (diff)
downloadkogata-47e6cd42f0744f6c04b8347093f6549339a856c9.tar.gz
kogata-47e6cd42f0744f6c04b8347093f6549339a856c9.zip
Implement ELF loading ; arrange so that user processes run.
Diffstat (limited to 'src/kernel/user/process.c')
-rw-r--r--src/kernel/user/process.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/kernel/user/process.c b/src/kernel/user/process.c
index b8b0c23..0f4892d 100644
--- a/src/kernel/user/process.c
+++ b/src/kernel/user/process.c
@@ -114,6 +114,10 @@ bool start_process(process_t *p, void* entry) {
return true;
}
+pagedir_t *proc_pagedir(process_t *p) {
+ return p->pd;
+}
+
// ================================== //
// MANAGING FILESYSTEMS FOR PROCESSES //
// ================================== //
@@ -224,6 +228,10 @@ bool munmap(process_t *proc, void* addr) {
}
}
+ // TODO : write modified pages back to file!
+
+ if (r->file != 0) unref_file(r->file);
+
free(r);
return true;