irq_bind
| Number | 0x41 |
|---|---|
| Signature | (dev_handle, ntfn_handle) -> 0 or -err |
| Group | irq |
| Since | 1.0 |
Bind a device’s interrupt to a notification object. When the IRQ fires, the kernel masks the line and signals the notification; the driver waits on it with ntfn_wait or waitany. This folds in the old irq_claim. The IRQ sets bit irq_num & 31.
Pitfalls
As of Loaf, do not bind two IRQs to a single notification. The 31st bit of the notification is reserved, do not bind any IRQs to it.
Arguments
| Register | Name | Description |
|---|---|---|
r0 | dev_handle | Handle of the device (from devmgr) |
r1 | ntfn_handle | Notification to signal on each interrupt |
Returns
0 on success.
Errors
| Code | Condition |
|---|---|
ERR_BADHANDLE / ERR_BADTYPE | Bad device or notification handle |
ERR_BUSY | Another process already owns that IRQ |
ERR_DEAD | Notification object is dead |
ERR_BADARG | Invalid IRQ number, or the device has no IRQ |