119 |
|
|
120 |
thread->ref_cnt = 1; |
thread->ref_cnt = 1; |
121 |
thread->suspend_cnt = 1; |
thread->suspend_cnt = 1; |
122 |
|
thread->swap_fn = thread_bootstrap_return; |
123 |
|
|
124 |
thread->sched_priority = 6; |
thread->sched_priority = 6; |
125 |
thread->sched_policy = THREAD_POLICY_TIMESHARE; |
thread->sched_policy = THREAD_POLICY_TIMESHARE; |
126 |
thread->sched_state = THREAD_STATE_SUSPEND; |
thread->sched_state = THREAD_STATE_SUSPEND | THREAD_STATE_SWAPPED; |
127 |
thread->sched_sp = & sched_policies [THREAD_POLICY_TIMESHARE]; |
thread->sched_sp = & sched_policies [THREAD_POLICY_TIMESHARE]; |
128 |
|
|
129 |
CALC_PREMUL (thread); |
CALC_PREMUL (thread); |
130 |
|
|
649 |
|
|
650 |
stack_alloc (thread, (void (*)()) thread_continue); |
stack_alloc (thread, (void (*)()) thread_continue); |
651 |
|
|
652 |
thread->sched_state &= ~THREAD_STATE_SUSPEND; |
thread->sched_state &= ~(THREAD_STATE_SUSPEND | THREAD_STATE_SWAPPED); |
653 |
thread->sched_state |= THREAD_STATE_RUN; |
thread->sched_state |= THREAD_STATE_RUN; |
654 |
thread->suspend_cnt = 0; |
thread->suspend_cnt = 0; |
655 |
} |
} |