From aba6ed4b91aff5d914be11704e34de75bfd4d003 Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Fri, 10 Sep 2010 18:46:00 +0200 Subject: Each thread has its own stack. Added simple unit tests for kmalloc,kfree Found a bug in heap_contract (not sure) but didn't fix it. --- src/kernel/task/task.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/kernel/task/task.h') diff --git a/src/kernel/task/task.h b/src/kernel/task/task.h index 0a95e57..171a9fd 100644 --- a/src/kernel/task/task.h +++ b/src/kernel/task/task.h @@ -26,7 +26,7 @@ struct process { uint32_t pid, uid, privilege, thread_count; struct process *parent; struct page_directory *pagedir; - size_t stacksBottom; + size_t stack; struct obj_descriptor *objects; uint32_t next_objdesc; @@ -44,7 +44,6 @@ struct thread { uint32_t timeWait; void* kernelStack_addr; uint32_t kernelStack_size; - struct segment_map *userStack_seg; struct thread *next, *queue_next; //queue_next is used in sched.c }; @@ -59,7 +58,7 @@ uint32_t tasking_handleException(struct registers *regs); void thread_goInactive(); //Blocks the current thread. it is then waked up by another thread or a system event. void thread_wakeUp(struct thread *t); int proc_priv(); //Returns current privilege level -struct thread * thread_new(struct process *proc, thread_entry entry_point, void *data); +struct thread * thread_new(struct process *proc, thread_entry entry_point, void *data, void *u_esp); struct process* process_new(struct process *parent, uint32_t uid, uint32_t privilege); void thread_exit(); //syscall -- cgit v1.2.3