Rev 3438 | Rev 3620 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 3438 | Rev 3566 | ||
|---|---|---|---|
| Line 52... | Line 52... | ||
| 52 | #include <arch/cpu.h> |
52 | #include <arch/cpu.h> |
| 53 | #include <mm/tlb.h> |
53 | #include <mm/tlb.h> |
| 54 | #include <proc/scheduler.h> |
54 | #include <proc/scheduler.h> |
| 55 | #include <udebug/udebug.h> |
55 | #include <udebug/udebug.h> |
| 56 | 56 | ||
| - | 57 | #define TASK_NAME_BUFLEN 20 |
|
| - | 58 | ||
| 57 | struct thread; |
59 | struct thread; |
| 58 | 60 | ||
| 59 | /** Task structure. */ |
61 | /** Task structure. */ |
| 60 | typedef struct task { |
62 | typedef struct task { |
| 61 | /** Task's linkage for the tasks_tree AVL tree. */ |
63 | /** Task's linkage for the tasks_tree AVL tree. */ |
| Line 65... | Line 67... | ||
| 65 | * |
67 | * |
| 66 | * Must be acquired before threads_lock and thread lock of any of its |
68 | * Must be acquired before threads_lock and thread lock of any of its |
| 67 | * threads. |
69 | * threads. |
| 68 | */ |
70 | */ |
| 69 | SPINLOCK_DECLARE(lock); |
71 | SPINLOCK_DECLARE(lock); |
| 70 | 72 | ||
| 71 | char *name; |
73 | char name[TASK_NAME_BUFLEN]; |
| 72 | /** List of threads contained in this task. */ |
74 | /** List of threads contained in this task. */ |
| 73 | link_t th_head; |
75 | link_t th_head; |
| 74 | /** Address space. */ |
76 | /** Address space. */ |
| 75 | as_t *as; |
77 | as_t *as; |
| 76 | /** Unique identity of task. */ |
78 | /** Unique identity of task. */ |