diff options
author | Alexis211 <alexis211@gmail.com> | 2010-02-09 12:44:06 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2010-02-09 12:44:06 +0100 |
commit | 4886faa3dce410543eda2139221e03959e73a747 (patch) | |
tree | e74cedd7b8a89005c802ddd3ce38f7ab5b8c4fb4 /src/kernel/linker | |
parent | 6a52d123672b7a00af6e22b4c138205be2042a94 (diff) | |
download | TCE-4886faa3dce410543eda2139221e03959e73a747.tar.gz TCE-4886faa3dce410543eda2139221e03959e73a747.zip |
Added user mode support and monitor_writeDec
Diffstat (limited to 'src/kernel/linker')
-rw-r--r-- | src/kernel/linker/elf.c | 4 | ||||
-rw-r--r-- | src/kernel/linker/elf.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/kernel/linker/elf.c b/src/kernel/linker/elf.c index dc7481b..59f4bdd 100644 --- a/src/kernel/linker/elf.c +++ b/src/kernel/linker/elf.c @@ -31,10 +31,10 @@ thread_entry elf_load(uint8_t *data, struct process* process) { return (thread_entry)ehdr->e_entry; } -struct process* elf_exec(uint8_t *data) { +struct process* elf_exec(uint8_t *data, int privilege) { if (elf_check(data)) return 0; - struct process* p = process_new(0, 0, PL_DRIVER); + struct process* p = process_new(0, 0, privilege); thread_entry e = elf_load(data, p); diff --git a/src/kernel/linker/elf.h b/src/kernel/linker/elf.h index f84bb62..c32cce0 100644 --- a/src/kernel/linker/elf.h +++ b/src/kernel/linker/elf.h @@ -58,6 +58,6 @@ struct phdr { int elf_check(uint8_t *data); //0 if ok, 1 if not a valid ELF thread_entry elf_load(uint8_t *data, struct process* process); //Load an ELF to a process, return entry point -struct process* elf_exec(uint8_t *data); //Creates a new process and a thread for running ELF file +struct process* elf_exec(uint8_t *data, int privilege); //Creates a new process and a thread for running ELF file #endif |