diff options
author | Jakob Odersky <jodersky@gmail.com> | 2014-04-08 13:18:27 +0200 |
---|---|---|
committer | Jakob Odersky <jodersky@gmail.com> | 2014-04-08 14:57:10 +0200 |
commit | 350437ef4b8ba0811d285f7454d2b54ffce6b029 (patch) | |
tree | 5084c73adbb4cc3aee9d000b3816d98a57203f36 /kernel/task/include/task/task.h | |
parent | c4ebb91caf33ecf5a47785584a4231eb1e4dfa2a (diff) | |
download | mux-350437ef4b8ba0811d285f7454d2b54ffce6b029.tar.gz mux-350437ef4b8ba0811d285f7454d2b54ffce6b029.tar.bz2 mux-350437ef4b8ba0811d285f7454d2b54ffce6b029.zip |
change build structure
Diffstat (limited to 'kernel/task/include/task/task.h')
-rw-r--r-- | kernel/task/include/task/task.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/kernel/task/include/task/task.h b/kernel/task/include/task/task.h deleted file mode 100644 index 120bda4..0000000 --- a/kernel/task/include/task/task.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef TASK_H -#define TASK_H - -#include "collection/list.h" - -/** - * Task control block, contains runtime - * information about tasks. - */ -struct tcb_t { - /** Stack pointer of this task. (must be first in structure) */ - char* volatile sp; - - /** Lowest address of this task's memory (inclusive). */ - char* mem_low; - - /** Highest address of this task's memory (inclusive). */ - char* mem_high; - - /** Entry function of this task. */ - void (*entry)(char); - - /** Current wait queue that this task is in.*/ - struct list_head queue; - - /** ID of task. */ - char id; - -}; - -/** - * Utility for declaring a task with statically allocated memory. - * Note: for a task to be scheduled, it must first be spawned (see spawn()). -*/ -#define DECLARE_TASK(name, stack_size, entry_function, pid) \ - static char _declared_stack_##name[stack_size]; \ - static struct tcb_t name = { \ - .sp = 0, \ - .mem_low = _declared_stack_##name, \ - .mem_high = _declared_stack_##name + stack_size - 1, \ - .entry = entry_function, \ - .queue = {}, \ - .id = pid \ - }; - -#endif
\ No newline at end of file |