From 4886faa3dce410543eda2139221e03959e73a747 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Tue, 9 Feb 2010 12:44:06 +0100 Subject: Added user mode support and monitor_writeDec --- src/kernel/linker/elf.c | 4 ++-- src/kernel/linker/elf.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/kernel/linker') 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 -- cgit v1.2.3