Line | |
---|
1 | #include "syslib.h"
|
---|
2 |
|
---|
3 | /*===========================================================================*
|
---|
4 | * sys_irqctl *
|
---|
5 | *===========================================================================*/
|
---|
6 | PUBLIC 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 */
|
---|
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.