vbos/amd64/kernel/proc.c
Michael Shaw 19b9d68651 types: add uaddr_t
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
2026-07-19 00:21:16 -04:00

20 lines
363 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/proc.h>
#include <arch/page.h>
#include <kernel/proc.h>
#include "arch/msr.h"
struct cpu_local *tls_get()
{
return (void *)rdmsr(IA32_GS_BASE);
}
struct proc *get_cur_proc()
{
struct cpu_local *l = tls_get();
if (!l)
return NULL;
if (!l->cur_thread)
return NULL;
return l->cur_thread->proc;
}