19 if (!
bucket.slot[i].used) {
20 bucket.slot[i].used =
true;
60 void* kstack =
kalloc(0x4000);
uint8_t get_current_core_cpuid()
#define THREAD_MAKE_ID(id, gen)
@ THREAD_STATE_TERMINATED
struct thread_bucket thread_bucket_t
#define THREAD_GET_ID(thread_id)
void serial2_printf(const char *fmt,...)
void * kalloc(size_t size)
scheduler_queue_t * vxSchedulerGetCurrentQueue(uint16_t core)
#define LOG2_DEBUG(mod, fmt,...)
void * vxSlabAlloc(struct slab_cache *cache)
void vxCreateSlabCache(struct slab_cache **cache, const char *name, const size_t obj_size, size_t alignment, const uintptr_t virt_addr)
void memset(void *ptr, int value, size_t num)
volatile uintptr_t * page
uintptr_t kernel_stack_base
uintptr_t kernel_stack_top
static thread_id thrAcquireNewSlot()
static thread_bucket_t bucket
static struct slab_cache * thread_cache
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)