summaryrefslogtreecommitdiff
path: root/src/kernel/task/task.h
diff options
context:
space:
mode:
authorAlexis211 <alexis211@gmail.com>2010-09-10 18:46:00 +0200
committerAlexis211 <alexis211@gmail.com>2010-09-10 18:46:00 +0200
commitaba6ed4b91aff5d914be11704e34de75bfd4d003 (patch)
tree3d5cf90e9ccad09d352c6a61e90027ef552dd87f /src/kernel/task/task.h
parent5fc3baaa17a6ffb34490bb8accb86f53ef3d6d15 (diff)
downloadTCE-aba6ed4b91aff5d914be11704e34de75bfd4d003.tar.gz
TCE-aba6ed4b91aff5d914be11704e34de75bfd4d003.zip
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.
Diffstat (limited to 'src/kernel/task/task.h')
-rw-r--r--src/kernel/task/task.h5
1 files changed, 2 insertions, 3 deletions
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