Rev 623 | Rev 788 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 623 | Rev 703 | ||
---|---|---|---|
Line 31... | Line 31... | ||
31 | 31 | ||
32 | #include <typedefs.h> |
32 | #include <typedefs.h> |
33 | #include <synch/spinlock.h> |
33 | #include <synch/spinlock.h> |
34 | #include <list.h> |
34 | #include <list.h> |
35 | 35 | ||
- | 36 | /** Task structure. */ |
|
36 | struct task { |
37 | struct task { |
37 | SPINLOCK_DECLARE(lock); |
38 | SPINLOCK_DECLARE(lock); |
38 | link_t th_head; /**< List of threads contained in this task. */ |
39 | link_t th_head; /**< List of threads contained in this task. */ |
39 | link_t tasks_link; /**< Link to other tasks within the system. */ |
40 | link_t tasks_link; /**< Link to other tasks within the system. */ |
40 | vm_t *vm; |
41 | as_t *as; /**< Address space. */ |
41 | }; |
42 | }; |
42 | 43 | ||
43 | extern spinlock_t tasks_lock; |
44 | extern spinlock_t tasks_lock; |
44 | extern link_t tasks_head; |
45 | extern link_t tasks_head; |
45 | 46 | ||
46 | extern void task_init(void); |
47 | extern void task_init(void); |
47 | extern task_t *task_create(vm_t *m); |
48 | extern task_t *task_create(as_t *as); |
48 | 49 | ||
49 | #endif |
50 | #endif |