2005-04-21 16:53:53 +02:00
|
|
|
#include "syslib.h"
|
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* sys_irqctl *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int sys_irqctl(req, irq_vec, policy, hook_id)
|
2005-04-21 16:53:53 +02:00
|
|
|
int req; /* IRQ control request */
|
|
|
|
int irq_vec; /* IRQ vector to control */
|
|
|
|
int policy; /* bit mask for policy flags */
|
2005-05-02 16:30:04 +02:00
|
|
|
int *hook_id; /* ID of IRQ hook at kernel */
|
2005-04-21 16:53:53 +02:00
|
|
|
{
|
|
|
|
message m_irq;
|
|
|
|
int s;
|
|
|
|
|
|
|
|
m_irq.m_type = SYS_IRQCTL;
|
2014-05-21 16:44:37 +02:00
|
|
|
m_irq.m_lsys_krn_sys_irqctl.request = req;
|
|
|
|
m_irq.m_lsys_krn_sys_irqctl.vector = irq_vec;
|
|
|
|
m_irq.m_lsys_krn_sys_irqctl.policy = policy;
|
|
|
|
m_irq.m_lsys_krn_sys_irqctl.hook_id = *hook_id;
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-02-09 16:20:09 +01:00
|
|
|
s = _kernel_call(SYS_IRQCTL, &m_irq);
|
2014-05-21 16:44:37 +02:00
|
|
|
if (req == IRQ_SETPOLICY) *hook_id = m_irq.m_krn_lsys_sys_irqctl.hook_id;
|
2005-05-02 16:30:04 +02:00
|
|
|
return(s);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|