etc/services - sync with NetBSD-8
[minix.git] / minix / lib / libsys / sys_irqctl.c
blob2cf0ad63f66d3271be225c2e2fa1799f5320519e
1 #include "syslib.h"
3 /*===========================================================================*
4 * sys_irqctl *
5 *===========================================================================*/
6 int sys_irqctl(req, irq_vec, policy, hook_id)
7 int req; /* IRQ control request */
8 int irq_vec; /* IRQ vector to control */
9 int policy; /* bit mask for policy flags */
10 int *hook_id; /* ID of IRQ hook at kernel */
12 message m_irq;
13 int s;
15 m_irq.m_type = SYS_IRQCTL;
16 m_irq.m_lsys_krn_sys_irqctl.request = req;
17 m_irq.m_lsys_krn_sys_irqctl.vector = irq_vec;
18 m_irq.m_lsys_krn_sys_irqctl.policy = policy;
19 m_irq.m_lsys_krn_sys_irqctl.hook_id = *hook_id;
21 s = _kernel_call(SYS_IRQCTL, &m_irq);
22 if (req == IRQ_SETPOLICY) *hook_id = m_irq.m_krn_lsys_sys_irqctl.hook_id;
23 return(s);