summaryrefslogtreecommitdiff
path: root/kernel/cpu.h
blob: 10acf76b43a68e3497d067d5e2edd5d5b239b2e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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];
}