Public Member Functions | |
SPINLOCK_DECLARE (lock) | |
Data Fields | |
link_t | rq_link |
link_t | wq_link |
link_t | th_link |
char | name [THREAD_NAME_BUFLEN] |
void(* | thread_code )(void *) |
void * | thread_arg |
context_t | saved_context |
context_t | sleep_timeout_context |
context_t | sleep_interruption_context |
bool | sleep_interruptible |
waitq_t * | sleep_queue |
timeout_t | sleep_timeout |
volatile int | timeout_pending |
bool | in_copy_from_uspace |
bool | in_copy_to_uspace |
bool | interrupted |
thread_join_type_t | join_type |
bool | detached |
waitq_t | join_wq |
fpu_context_t * | saved_fpu_context |
int | fpu_context_exists |
int | fpu_context_engaged |
rwlock_type_t | rwlock_holder_type |
void(* | call_me )(void *) |
void * | call_me_with |
state_t | state |
int | flags |
cpu_t * | cpu |
task_t * | task |
__u64 | ticks |
int | priority |
__u32 | tid |
thread_arch_t | arch |
__u8 * | kstack |
Definition at line 81 of file thread.h.
|
Lock protecting thread structure. Protects the whole thread structure except list links above. |
|
Architecture-specific data. |
|
Funtion to be called in scheduler before the thread is put asleep. Referenced by thread_create(). |
|
Argument passed to call_me(). Definition at line 137 of file thread.h. Referenced by thread_create(). |
|
Thread's CPU. Definition at line 142 of file thread.h. Referenced by kinit(), thread_create(), thread_destroy(), and thread_ready(). |
|
If true, thread_join_timeout() cannot be used on this thread. Definition at line 121 of file thread.h. Referenced by thread_create(), thread_detach(), and thread_join_timeout(). |
|
Thread's flags. Definition at line 140 of file thread.h. Referenced by kcpulb(), kinit(), thread_create(), and thread_ready(). |
|
Definition at line 132 of file thread.h. Referenced by kcpulb(), and thread_create(). |
|
Definition at line 125 of file thread.h. Referenced by thread_create(). |
|
True if this thread is executing copy_from_uspace(). False otherwise. Definition at line 110 of file thread.h. Referenced by thread_create(). |
|
True if this thread is executing copy_to_uspace(). False otherwise. Definition at line 112 of file thread.h. Referenced by thread_create(). |
|
If true, the thread will not go to sleep at all and will call thread_exit() before returning to userspace. Definition at line 118 of file thread.h. Referenced by task_kill(), and thread_create(). |
|
Who joinins the thread. Definition at line 120 of file thread.h. Referenced by ktaskclnp(), ktaskgc(), and thread_create(). |
|
Waitq for thread_join_timeout(). Definition at line 122 of file thread.h. Referenced by thread_create(), and thread_join_timeout(). |
|
Thread's kernel stack. Definition at line 152 of file thread.h. Referenced by thr_constructor(), thr_destructor(), and thread_create(). |
|
Definition at line 92 of file thread.h. Referenced by thread_create(). |
|
Thread's priority. Implemented as index to CPU->rq Definition at line 147 of file thread.h. Referenced by thread_create(), and thread_ready(). |
|
Run queue link. Definition at line 82 of file thread.h. Referenced by kcpulb(), thr_constructor(), and thread_ready(). |
|
Definition at line 134 of file thread.h. Referenced by let_others_in(), and thread_create(). |
|
From here, the stored context is restored when the thread is scheduled. Definition at line 98 of file thread.h. Referenced by thread_create(), waitq_interrupt_sleep(), and waitq_timeouted_sleep(). |
|
Definition at line 124 of file thread.h. Referenced by thr_constructor(), and thr_destructor(). |
|
If true, the thread can be interrupted from sleep. Definition at line 104 of file thread.h. Referenced by thread_create(), and waitq_interrupt_sleep(). |
|
From here, the stored interruption context is restored when sleep is interrupted. Definition at line 102 of file thread.h. Referenced by waitq_interrupt_sleep(). |
|
Wait queue in which this thread sleeps. Definition at line 105 of file thread.h. Referenced by _waitq_wakeup_unsafe(), thread_create(), waitq_interrupt_sleep(), and waitq_timeouted_sleep(). |
|
Timeout used for timeoutable sleeping. Definition at line 106 of file thread.h. Referenced by _waitq_wakeup_unsafe(), thread_create(), and waitq_interrupt_sleep(). |
|
From here, the stored timeout context is restored when sleep times out. Definition at line 100 of file thread.h. Referenced by waitq_timeouted_sleep(). |
|
Thread's state. Definition at line 139 of file thread.h. Referenced by kcpulb(), ktaskgc(), sched_print_list(), task_kill(), thread_create(), thread_destroy(), thread_detach(), and thread_ready(). |
|
Containing task. Definition at line 143 of file thread.h. Referenced by thread_create(), and thread_destroy(). |
|
Links to threads within containing task. Definition at line 84 of file thread.h. Referenced by thr_constructor(), and thread_create(). |
|
Argument passed to thread_code() function. Definition at line 95 of file thread.h. Referenced by thread_create(). |
|
Function implementing the thread. Referenced by thread_create(). |
|
Ticks before preemption. Definition at line 145 of file thread.h. Referenced by thread_create(). |
|
Thread ID. Definition at line 148 of file thread.h. Referenced by kcpulb(), sched_print_list(), sys_thread_create(), and thread_create(). |
|
Flag signalling sleep timeout in progress. Definition at line 107 of file thread.h. Referenced by _waitq_wakeup_unsafe(), thread_create(), waitq_interrupt_sleep(), and waitq_timeouted_sleep(). |
|
Wait queue link. Definition at line 83 of file thread.h. Referenced by _waitq_wakeup_unsafe(), thr_constructor(), waitq_interrupt_sleep(), and waitq_timeouted_sleep(). |