|
Voxia OS v0.0.1
Hobby Project Operating System Targeting x86-64
|
#include "procc/thread.h"#include "autoconf.h"#include "init/init.h"#include "libk/serial.h"#include "memory/slab.h"#include "scheduler.h"#include <hal/cpu/core.h>#include <str.h>Go to the source code of this file.
Functions | |
| INIT (Thread) | |
| static thread_id | thrAcquireNewSlot () |
| static thread_t * | thrCreateInstance () |
| static void | vxUpdateThreadSlot (const thread_id id, thread_t *thr) |
| thread_t * | create_thread (volatile uintptr_t *page, uintptr_t entry, uintptr_t stack, uint16_t core_affinity, uint8_t priority, uint16_t flags) |
| void | vxThreadExit () |
Variables | |
| static struct slab_cache * | thread_cache = 0 |
| static thread_bucket_t | bucket = {0} |
| thread_t * create_thread | ( | volatile uintptr_t * | page, |
| uintptr_t | entry, | ||
| uintptr_t | stack, | ||
| uint16_t | core_affinity, | ||
| uint8_t | priority, | ||
| uint16_t | flags ) |
Definition at line 41 of file thread.c.
References core_affinity, thread::core_affinity, thread::entry_addr, flags, thread::flags, thread::id, kalloc(), thread::kernel_rsp, thread::kernel_stack_base, thread::kernel_stack_top, LOG2_DEBUG, memset(), page, thread::page, priority, thread::priority, serial2_printf(), stack, thread::stack, thread::state, thrAcquireNewSlot(), thrCreateInstance(), THREAD_STATE_CREATE, and vxUpdateThreadSlot().
| INIT | ( | Thread | ) |
Definition at line 13 of file thread.c.
References thread_cache, and vxCreateSlabCache().
|
static |
Definition at line 17 of file thread.c.
References bucket, LOG2_DEBUG, and THREAD_MAKE_ID.
Referenced by create_thread().
|
static |
Definition at line 31 of file thread.c.
References thread_cache, and vxSlabAlloc().
Referenced by create_thread().
| void vxThreadExit | ( | void | ) |
Definition at line 70 of file thread.c.
References get_current_core_cpuid(), queue, THREAD_STATE_TERMINATED, and vxSchedulerGetCurrentQueue().
Referenced by workqueue_process().
Definition at line 36 of file thread.c.
References bucket, idx, and THREAD_GET_ID.
Referenced by create_thread().
|
static |
Definition at line 11 of file thread.c.
Referenced by cache_lookup(), create_netdev(), lookup_netdev(), thrAcquireNewSlot(), and vxUpdateThreadSlot().
|
static |
Definition at line 10 of file thread.c.
Referenced by INIT(), and thrCreateInstance().