Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!hp-pcd!hpfcso!hplisa!hplvli!pha From: pha@hplvli.HP.COM (Rick Adams) Newsgroups: comp.sys.hp Subject: Re: Needed: Interrupt handler. Message-ID: <26630001@hplvli.HP.COM> Date: 31 Oct 90 02:33:15 GMT References: <1628.2727168f@iccgcc.decnet.ab.com> Organization: Loveland Inst. Div Lines: 53 First a disclaimer: I am by no means an expert on this subject. However, I do have some recent experience using the VXI dil extensions and the somewhat opaque documentaion (just my personal opinion!) that accompanies it. All of the interrupt request lines (IRQ1*-IRQ7*) are merged into a single event, VXI_PSIGNAL_VME, that can optionally be used to send a unix signal to your process. If your VME device releases its request when it is acknowledged by the interrupt handler (I am assuming it will be the V360) then there appears to be no immediate way of determining which IRQ caused the signal to be sent, it appears that you have to poll all possible interrupters. If your VME device does not release its request until some register is read (a so-called RORA device) then there is an ioctl call which allows you to determine the current state of all IRQ lines. The following is an example of the way I used the provided interrupt service functions. ---------------------- #include int vxi_eid; . . . . /* Somewhere in an initialization function */ stuct interrupt_struct my_int_cause; /* struct found in vxi.h */ int (*isr_hook)(); vxi_eid = open( "/dev/vxi/primary", O_RDWR ); my_int_cause.cause = VXI_INT_VME; /* name defined in vxi.h */ isr_hook = io_on_interrupt( vxi_eid, my_int_cause, my_isr ); if ( isr_hook == (int(*)()) -1 ) { /* take some failure action */ } . . . void my_isr( ) { /* Do what ever needs doing here but be cautious. Signals that arrive while you are in this function are lost! /* io_interrupt_ctl( vxi_eid, 1 ); /* Must re-enable interrupt signalling */ } ---------------------- Hope this was some help, Rick Adams, Hewlett-Packard, Loveland Instrument Division