Go to the source code of this file.
◆ free_kstack()
void free_kstack |
( |
void * |
stack_ptr | ) |
|
Frees a kernel stack so it can be used again
- Parameters
-
stack_ptr | The kernel stack to free |
◆ setup_kstack()
void setup_kstack |
( |
Thread * |
thread, |
|
|
void * |
param1, |
|
|
void * |
param2, |
|
|
char |
kmode, |
|
|
void * |
eip |
|
) |
| |
Setup a kernel stack for a thread
- Parameters
-
thread | The thread to setup a stack for |
param1 | The thread's start function first parameter |
param2 | The thread's start function second parameter |
kmode | Whether the thread is a kernel mode thread |
eip | The start address of the thread |
◆ switch_to_thread_asm()
void switch_to_thread_asm |
( |
Thread * |
thread | ) |
|
The assembly part of switching to a thread. Performs the actual context switch.
- Parameters
-
thread | The thread to switch to. |
◆ task_init()
Initializes a usermode task
◆ wait_for_unblocked_thread_asm()
void wait_for_unblocked_thread_asm |
( |
| ) |
|
An assembly helper for waiting for an unblocked thread Starts interrupts, halts, then clears interrupts.