Typedef some common structs

This commit is contained in:
Imbus 2025-09-01 23:41:00 +02:00
parent 52f88785c4
commit eec052bafa
2 changed files with 17 additions and 13 deletions

View file

@ -1,6 +1,6 @@
#include <proc.h>
struct Cpu cpus[NCPU];
Cpu cpus[NCPU];
/**
* Must be called with interrupts disabled, to prevent race with process being
@ -14,8 +14,8 @@ int cpuid() {
/**
* Return this CPU's cpu struct. Interrupts must be disabled.
*/
struct Cpu *mycpu(void) {
int id = cpuid();
struct Cpu *c = &cpus[id];
Cpu *mycpu(void) {
int id = cpuid();
Cpu *c = &cpus[id];
return c;
}