|
XenevaOS
|


Go to the source code of this file.
Classes | |
| struct | _frame_ |
| struct | _syscall_param_ |
| struct | _uentry_ |
| struct | _signal_queue_ |
| struct | _au_thread_ |
Macros | |
| #define | THREAD_STATE_READY 1 |
| #define | THREAD_STATE_BLOCKED 3 |
| #define | THREAD_STATE_SLEEP 4 |
| #define | THREAD_STATE_KILLABLE 5 |
| #define | THREAD_LEVEL_KERNEL (1<<0) |
| #define | THREAD_LEVEL_USER (1<<1) |
| #define | THREAD_LEVEL_SUBTHREAD (1<<2) |
| #define | THREAD_LEVEL_MAIN_THREAD (1<<3) |
Typedefs | |
| typedef struct _frame_ | AuThreadFrame |
| typedef struct _syscall_param_ | AuSyscallParam |
| typedef struct _uentry_ | AuUserEntry |
| typedef struct _signal_queue_ | SignalQueue |
| typedef struct _au_thread_ | AuThread |
| #define THREAD_LEVEL_KERNEL (1<<0) |
Thread levels ========================================================= THREAD_LEVEL_KERNEL – This bit is set when the thread given is kernel mode THREAD_LEVEL_USER – This bit is set when the thread given is user mode
| #define THREAD_LEVEL_MAIN_THREAD (1<<3) |
| #define THREAD_LEVEL_SUBTHREAD (1<<2) |
| #define THREAD_LEVEL_USER (1<<1) |
| #define THREAD_STATE_BLOCKED 3 |
| #define THREAD_STATE_KILLABLE 5 |
| #define THREAD_STATE_READY 1 |
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.
| #define THREAD_STATE_SLEEP 4 |
| typedef struct _syscall_param_ AuSyscallParam |
| typedef struct _au_thread_ AuThread |
| typedef struct _frame_ AuThreadFrame |
| typedef struct _uentry_ AuUserEntry |
| typedef struct _signal_queue_ SignalQueue |
| AU_EXTERN AU_EXPORT AuThread * AuCreateKthread | ( | void(*)(uint64_t) | entry, |
| uint64_t | stack, | ||
| uint64_t | cr3, | ||
| char * | name | ||
| ) |
! 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 |
AuForceScheduler – force the scheduler to switch next thread.
AuGetSystemTimerTick – return the current system timer tick.
|
extern |
|
extern |
|
extern |
AuSchedulerStart – start the scheduler.
|
extern |
|
extern |