summaryrefslogtreecommitdiff
path: root/kernel/include/arch/x86_64/interrupts/irq.hpp
blob: 40031848c7dd33b5c99aa1eb9d6a307dcc6237b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

#include <cstdint>

#pragma once

#define IRQ_TYPE_OTHER 0 
#define IRQ_TYPE_LEGACY 1 
#define IRQ_TYPE_MSI 2 
#define IRQ_TYPE_LEGACY_USERSPACE 3

typedef struct {
    void (*func)(void* arg);
    void* arg;
    int irq;
    char is_userspace;
} irq_t;

namespace arch {
    namespace x86_64 {
        namespace interrupts {
            class irq {
            public:
                static std::uint8_t create(std::uint16_t irq,std::uint8_t type,void (*func)(void* arg),void* arg,std::uint64_t flags);
                static void reset();
            };
        };
    };
};