|
XenevaOS
|
#include <Hal/x86_64_sched.h>#include <Hal/x86_64_hal.h>#include <Hal/Hal.h>#include <Hal/x86_64_cpu.h>#include <Hal/x86_64_lowlevel.h>#include <Hal/x86_64_signal.h>#include <Hal/x86_64_pic.h>#include <Sync/spinlock.h>#include <Hal/serial.h>#include <Mm/kmalloc.h>#include <Mm/vmmngr.h>#include <Hal/pcpu.h>#include <Mm/pmmngr.h>#include <string.h>#include <_null.h>#include <aucon.h>
! Creates a kernel mode thread
| entry | – Entry point address |
| stack | – Stack address |
| cr3 | – the top most page map level address |
| name | – name of the thread |
| priority | – (currently unused) thread's priority |
| AuThread * AuGetCurrentThread | ( | ) |
| uint64_t AuGetSystemTimerTick | ( | ) |
| void AuHandleSleepThreads | ( | ) |
| void AuIdleThread | ( | uint64_t | t | ) |
| bool AuIsSchedulerInitialised | ( | ) |
| void AuNextThread | ( | ) |
| void AuPrintStack | ( | ) |
| void AuSchedulerInitAp | ( | ) |
| void AuSchedulerInitialise | ( | ) |
| void AuSchedulerStart | ( | ) |
| void AuThreadCleanTrash | ( | AuThread * | t | ) |
| void AuThreadDelete | ( | AuThread * | thread | ) |
AuThreadDelete – remove a thread from thread list
| thread | – thread address to remove |
| void AuThreadDeleteBlock | ( | AuThread * | thread | ) |
AuThreadDeleteBlock – remove a thread from thread list
| thread | – thread address to remove |
| void AuThreadDeleteSleep | ( | AuThread * | thread | ) |
AuThreadDeleteSleep – remove a thread from sleep list
| thread | – thread address to remove |
| void AuThreadDeleteTrash | ( | AuThread * | thread | ) |
AuThreadDeleteTrash – remove a thread from thread list
| thread | – thread address to remove |
| void AuThreadInsert | ( | AuThread * | new_task | ) |
| void AuThreadInsertBlock | ( | AuThread * | new_task | ) |
Insert a thread to thread list
| new_task | – new thread address |
| void AuThreadInsertSleep | ( | AuThread * | new_task | ) |
Insert a thread to sleep list
| new_task | – new thread address |
| void AuThreadInsertTrash | ( | AuThread * | new_task | ) |
Insert a thread to trash list
| new_task | – new thread address |
| void AuThreadMoveToTrash | ( | AuThread * | t | ) |
| void execute_idle | ( | AuThread * | t, |
| void * | tss | ||
| ) |
| int save_context | ( | AuThread * | t, |
| void * | tss | ||
| ) |
| uint64_t x64_get_rsp | ( | ) |
| void x8664SchedulerISR | ( | size_t | v, |
| void * | param | ||
| ) |
| Spinlock* _idle_lock |
| AuThread* _idle_thr |
| bool _x86_64_sched_enable |
| bool _x86_64_sched_init |
| AA64Thread * blocked_thr_head |
| AA64Thread * blocked_thr_last |
| AuThread* sleep_thr_head |
| AuThread* sleep_thr_last |
| AuThread* thread_list_head |
BSD 2-Clause License
Copyright (c) 2022-2023, Manas Kamal Choudhury All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
| AuThread* thread_list_last |
| AuThread* trash_thr_head |
| AuThread* trash_thr_last |