124 |
if (! (new_thread->sched_state & THREAD_STATE_IDLE)) |
if (! (new_thread->sched_state & THREAD_STATE_IDLE)) |
125 |
PROCESSOR_CURRENT()->state = PROCESSOR_STATE_RUNNING; |
PROCESSOR_CURRENT()->state = PROCESSOR_STATE_RUNNING; |
126 |
PROCESSOR_CURRENT()->current_thread = new_thread; |
PROCESSOR_CURRENT()->current_thread = new_thread; |
127 |
|
new_thread->last_processor = PROCESSOR_CURRENT(); |
128 |
|
|
129 |
PMAP_ACTIVATE (new_thread->task->map->pmap); |
PMAP_ACTIVATE (new_thread->task->map->pmap); |
130 |
|
|
147 |
PMAP_ACTIVATE (new_task->map->pmap); |
PMAP_ACTIVATE (new_task->map->pmap); |
148 |
|
|
149 |
active_threads [CPU_CURRENT ()] = new_thread; |
active_threads [CPU_CURRENT ()] = new_thread; |
150 |
|
if (! (new_thread->sched_state & THREAD_STATE_IDLE)) |
151 |
|
PROCESSOR_CURRENT()->state = PROCESSOR_STATE_RUNNING; |
152 |
|
PROCESSOR_CURRENT()->current_thread = new_thread; |
153 |
|
new_thread->last_processor = PROCESSOR_CURRENT(); |
154 |
|
|
155 |
/* Load the rest of the user state for the new thread. */ |
/* Load the rest of the user state for the new thread. */ |
156 |
switch_ktss (&new_thread->pcb); |
switch_ktss (&new_thread->pcb); |