aboutsummaryrefslogtreecommitdiff
path: root/kapi
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-07-24 12:36:04 +0200
committerFelix Morgner <felix.morgner@ost.ch>2026-07-24 12:36:04 +0200
commitc86b42b88659c50b6def9b5b52b4605b2a0e5d13 (patch)
tree51e76a56280839bd2f620a920b7c719a4a16e55c /kapi
parent1c8e8faf1de6477b6a514817be8bb8ab4eef2960 (diff)
downloadkernel-c86b42b88659c50b6def9b5b52b4605b2a0e5d13.tar.xz
kernel-c86b42b88659c50b6def9b5b52b4605b2a0e5d13.zip
kapi/interrupts: add ISR context
Diffstat (limited to 'kapi')
-rw-r--r--kapi/kapi/interrupts.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/kapi/kapi/interrupts.hpp b/kapi/kapi/interrupts.hpp
index 4ba06848..41710c2b 100644
--- a/kapi/kapi/interrupts.hpp
+++ b/kapi/kapi/interrupts.hpp
@@ -1,6 +1,8 @@
#ifndef TEACHOS_KAPI_INTERRUPTS_HPP
#define TEACHOS_KAPI_INTERRUPTS_HPP
+#include <kstd/memory.hpp>
+
#include <cstdint>
namespace kapi::interrupts
@@ -29,8 +31,9 @@ namespace kapi::interrupts
//! task quickly and must take care when acquiring globally shared locks.
//!
//! @param irq_number The identifier of the interrupt request that triggered the handler.
+ //! @param context Additional context data associated during handler registration.
//! @return status::handled if the handler successfully handled the interrupt, status::unhandled otherwise.
- virtual auto handle_interrupt(std::uint32_t irq_number) -> status = 0;
+ virtual auto handle_interrupt(std::uint32_t irq_number, kstd::weak_ptr<void> context) -> status = 0;
};
//! @}
@@ -42,7 +45,8 @@ namespace kapi::interrupts
//!
//! @param irq_number The IRQ number to register the handler for.
//! @param handler The interrupt handler to register.
- auto register_handler(std::uint32_t irq_number, handler & handler) -> void;
+ //! @param context Additional context data to be passed back to the handler when the interrupt occurs.
+ auto register_handler(std::uint32_t irq_number, handler & handler, kstd::weak_ptr<void> context) -> void;
//! Unregister a previously registered interrupt handler.
//!