![]() |
![]() |
![]() |
![]() |
Attach an “idle” interrupt handler
#include <sys/neutrino.h> int InterruptHookIdle( void (*handler)(uint64_t *, struct qtime_entry *), unsigned flags );
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
The InterruptHookIdle() kernel call attaches the specified interrupt handler to the “idle” interrupt, which is called when the system is idle. This is typically used to implement power management features.
The arguments to the handler function are:
The simplest idle handler consists of a halt instruction.
This call doesn't block.
An interrupt function ID, or -1 if an error occurs (errno is set).
Use the returned value with the InterruptDetach() function to detach this interrupt handler.
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | No |
Signal handler | Yes |
Thread | Yes |
InterruptAttach(), InterruptAttachEvent(), InterruptDetach(), InterruptHookTrace()
Writing an Interrupt Handler chapter of the Neutrino Programmer's Guide
![]() |
![]() |
![]() |
![]() |