source: trunk/minix/lib/syslib/sys_irqctl.c@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 790 bytes
Line 
1#include "syslib.h"
2
3/*===========================================================================*
4 * sys_irqctl *
5 *===========================================================================*/
6PUBLIC int sys_irqctl(req, irq_vec, policy, hook_id)
7int req; /* IRQ control request */
8int irq_vec; /* IRQ vector to control */
9int policy; /* bit mask for policy flags */
10int *hook_id; /* ID of IRQ hook at kernel */
11{
12 message m_irq;
13 int s;
14
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;
20
21 s = _taskcall(SYSTASK, SYS_IRQCTL, &m_irq);
22 if (req == IRQ_SETPOLICY) *hook_id = m_irq.IRQ_HOOK_ID;
23 return(s);
24}
25
26
Note: See TracBrowser for help on using the repository browser.