Initial commit
This commit is contained in:
22
kernel/cpu.h
Normal file
22
kernel/cpu.h
Normal file
@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
|
||||
#include "kernel/lib.h"
|
||||
|
||||
#define MAX_CPU 16
|
||||
|
||||
struct Cpu
|
||||
{
|
||||
uint32_t id;
|
||||
|
||||
uint32_t intr_off_count;
|
||||
bool intr_enabled_before_off;
|
||||
};
|
||||
typedef struct Cpu Cpu;
|
||||
|
||||
extern Cpu cpus[MAX_CPU];
|
||||
|
||||
static inline Cpu* current_cpu()
|
||||
{
|
||||
// @Todo current_cpu, better
|
||||
return &cpus[0];
|
||||
}
|
Reference in New Issue
Block a user