23 lines
321 B
C
23 lines
321 B
C
#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];
|
|
}
|