make vfs & filesystems use failable copying
[minix3.git] / lib / libsys / sys_irqctl.c
blob58578d707d099e2bc4bd96edce3f6237db63c907
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.IRQ_REQUEST = req;
17 m_irq.IRQ_VECTOR = irq_vec;
18 m_irq.IRQ_POLICY = policy;
19 m_irq.IRQ_HOOK_ID = *hook_id;
21 s = _kernel_call(SYS_IRQCTL, &m_irq);
22 if (req == IRQ_SETPOLICY) *hook_id = m_irq.IRQ_HOOK_ID;
23 return(s);