2022-05-11 14:54:03 +00:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2022, Timon Kruiper <timonkruiper@gmail.com>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2023-11-02 22:21:09 +00:00
|
|
|
#include <AK/Error.h>
|
2022-05-11 14:54:03 +00:00
|
|
|
#include <AK/Platform.h>
|
|
|
|
#include <AK/Types.h>
|
|
|
|
|
2022-10-04 00:05:54 +00:00
|
|
|
#if ARCH(X86_64)
|
2022-10-04 10:46:11 +00:00
|
|
|
# include <Kernel/Arch/x86_64/Interrupts.h>
|
2022-05-11 14:54:03 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
class GenericInterruptHandler;
|
|
|
|
|
|
|
|
GenericInterruptHandler& get_interrupt_handler(u8 interrupt_number);
|
|
|
|
void register_generic_interrupt_handler(u8 number, GenericInterruptHandler&);
|
|
|
|
void unregister_generic_interrupt_handler(u8 number, GenericInterruptHandler&);
|
2023-04-28 12:33:10 +00:00
|
|
|
ErrorOr<u8> reserve_interrupt_handlers(u8 number_of_irqs);
|
2022-05-11 14:54:03 +00:00
|
|
|
|
2022-05-17 09:07:02 +00:00
|
|
|
void initialize_interrupts();
|
|
|
|
|
2022-05-11 14:54:03 +00:00
|
|
|
}
|