change pointers used in function calls

change from void* to cls_t* as it makes more sense to be this way
This commit is contained in:
Matheus
2022-07-24 18:09:25 -03:00
parent 5213654224
commit 607b82ed6c
2 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -5,12 +5,12 @@
cls_t bspcls;
void arch_setcls(void* addr){
void arch_setcls(cls_t* addr){
wrmsr(MSR_GSBASE, (uint64_t)addr);
}
void* arch_getcls(){
return (void*)rdmsr(MSR_GSBASE);
cls_t* arch_getcls(){
return (cls_t*)rdmsr(MSR_GSBASE);
}
void bsp_setcls(){
+4 -3
View File
@@ -5,7 +5,7 @@
#include <arch/ist.h>
#include <arch/ist.h>
#include <arch/regs.h>
#include <arch/mmu.h>
#include <kernel/vmm.h>
// cpu level storage
// this will be pointed to by GS and will contain per cpu info
@@ -14,11 +14,12 @@ typedef struct{
gdt_t gdt;
ist_t ist;
arch_regserror *laststate;
vmm_context *context;
} cls_t;
void bsp_setcls();
void arch_setcls(void* addr);
void* arch_getcls();
void arch_setcls(cls_t* addr);
cls_t* arch_getcls();
static cls_t __seg_gs *cls = 0;