|
GitOS
|
Go to the source code of this file.
Data Structures | |
| struct | registers |
| struct | task |
Macros | |
| #define | PROGRAM_VIRTUAL_ADDRESS 0x400000 |
| #define | PROGRAM_VIRTUAL_STACK_SIZE 1024 * 16 |
| #define | PROGRAM_VIRTUAL_STACK_ADDRESS_START 0x3FF000 |
| #define | PROGRAM_VIRTUAL_STACK_ADDRESS_END PROGRAM_VIRTUAL_STACK_ADDRESS_START - PROGRAM_VIRTUAL_STACK_SIZE |
Functions | |
| struct registers | __attribute__ ((packed)) |
| struct task * | task_current () |
| Returns currently running task. | |
| struct task * | task_get_next () |
| Returns next task in list (or first if there is no next task in current_task). | |
| struct task * | task_new (struct process *process) |
| int | task_free (struct task *task) |
| Frees all data associated with task struct. | |
| void | task_return (struct registers *registers) |
| void | task_run_first_ever_task () |
| void | user_registers () |
| int | task_switch (struct task *task) |
| Switch current task (switch pages). | |
| int | task_page () |
| Loads into the task's page. | |
| void | task_page_task (struct task *task) |
| void | task_current_save_state (struct interrupt_frame *frame) |
| int | task_copy_string_from (struct task *task, void *virtual_address, void *physical_address, int max) |
| void * | task_peek_stack (struct task *task, int offset) |
Variables | |
| uint32_t | edi |
| uint32_t | esi |
| uint32_t | ebp |
| uint32_t | ebx |
| uint32_t | edx |
| uint32_t | ecx |
| uint32_t | eax |
| uint32_t | ip |
| uint32_t | cs |
| uint32_t | flags |
| uint32_t | esp |
| uint32_t | ss |
| struct task | __attribute__ |
| #define PROGRAM_VIRTUAL_ADDRESS 0x400000 |
| #define PROGRAM_VIRTUAL_STACK_ADDRESS_END PROGRAM_VIRTUAL_STACK_ADDRESS_START - PROGRAM_VIRTUAL_STACK_SIZE |
| #define PROGRAM_VIRTUAL_STACK_ADDRESS_START 0x3FF000 |
| #define PROGRAM_VIRTUAL_STACK_SIZE 1024 * 16 |
| struct registers __attribute__ | ( | (packed) | ) |
| int task_copy_string_from | ( | struct task * | task, |
| void * | virtual_address, | ||
| void * | physical_address, | ||
| int | max ) |
| struct task * task_current | ( | ) |
| void task_current_save_state | ( | struct interrupt_frame * | frame | ) |
References kernel_panic(), task_current(), and task_save_state().
| int task_free | ( | struct task * | task | ) |
Frees all data associated with task struct.
| task | Task to free |
References kfree(), task::page_directory, and paging_free_directory().
| struct task * task_get_next | ( | ) |
Returns next task in list (or first if there is no next task in current_task).
References current_task, and task_head.
References current_task, ENOMEM, ERROR, ISERR, kzalloc(), task::prev, task_free(), task_head, task_init(), and task_tail.
| int task_page | ( | ) |
Loads into the task's page.
References current_task, task_switch(), and user_registers().
| void task_page_task | ( | struct task * | task | ) |
References task_switch(), and user_registers().
| void * task_peek_stack | ( | struct task * | task, |
| int | offset ) |
References registers::esp, kernel_page(), offset, task::registers, and task_page_task().
| void task_return | ( | struct registers * | registers | ) |
| void task_run_first_ever_task | ( | ) |
References current_task, kernel_panic(), task_head, task_return(), and task_switch().
| int task_switch | ( | struct task * | task | ) |
Switch current task (switch pages).
| task | Task to switch to |
References current_task, task::page_directory, and paging_switch().
| void user_registers | ( | ) |
References offset.
| struct task __attribute__ |
| uint32_t cs |
| uint32_t eax |
| uint32_t ebp |
| uint32_t ebx |
| uint32_t ecx |
| uint32_t edi |
| uint32_t edx |
| uint32_t esi |
| uint32_t esp |
| uint32_t flags |
| uint32_t ip |
| uint32_t ss |