Io_Interrupt_Ctl - HP 9000 Series 300 Tutorials Manual

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

io_interrupt_ctl
Subroutine io_interrupt_ctl provides a convenient means for enabling
and disabling interrupts on a specific eid. Since interrupts are automatically
disabled when an interrupt occurs, io_interrupt_ctl is commonly used to
re-enable interrupts during a series of repetitive operations that are being
handled under interrupt control. The call to io_interrupt_ctl has the
following form:
where eid is the entity identifier for an open GPIO or raw HP-IB interface
(device) file. The value of enable_flag determines whether interrupts are to
be enabled or disabled: if enable_flag is non-zero, interrupts are enabled on
the eid; if enable-flag is zero, interrupts are disabled. Attempting to use
io_interrupt_ctl on an eid fails when no previous call has been lnade to
io_on_interrupt for the same eid.
The following code segment shows how the previous example can be modified
slightly so that interrupts are re-enabled at the end of the interrupt service
routine:
handler(eid, cause_vec);
int eid;
struct interrupt_struct *cause_vec;
{
if (cause_vec->cause
==
SRQ)
service_routine();
1*
application-specific service routine*1
}
General-Purpose Routines
2-31

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents