From 516601b7baaee4aefb4bdbfc7a55d05fe26c8465 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 17 May 2021 15:43:30 +0200 Subject: [PATCH] os: add Platform::Device::sigh_omit_initial_signal Add possibility to register an interrupt handler without triggering an initial spurious interrupt for ported device driver code. Fixes #4154 --- repos/os/include/spec/arm/platform_session/device.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/repos/os/include/spec/arm/platform_session/device.h b/repos/os/include/spec/arm/platform_session/device.h index 42277a4ac9..d70eacd997 100644 --- a/repos/os/include/spec/arm/platform_session/device.h +++ b/repos/os/include/spec/arm/platform_session/device.h @@ -149,6 +149,17 @@ class Platform::Device::Irq : Noncopyable if (sigh.valid()) Signal_transmitter(sigh).submit(); } + + /** + * Register interrupt signal handler + * + * This call omits the one-time trigger of the interrupt + * handler for ported drivers that cannot handle it sufficiently. + */ + void sigh_omit_initial_signal(Signal_context_capability sigh) + { + _irq.sigh(sigh); + } }; #endif /* _INCLUDE__SPEC__ARM__PLATFORM_SESSION__DEVICE_H_ */