Functional Description
3-19
DI Device Files
1
Each distributed interrupt is accessed through its own special device file:
/dev/rcim
N
/di
M
where
N
is the RCIM card number (starting from zero) and
M
is the ID of the distributed
interrupt.
These files are created automatically on system boot by the
/etc/init.d/rcim
initialization script.
User Interface to DIs
1
A distributed interrupt is controlled by
open(2)
,
close(2)
, and
ioctl(2)
system
calls. Note that this device does not support the
read(2)
,
write(2)
and
mmap(2)
system calls.
The
open
call assigns a file descriptor to one distributed interrupt. A
close
call frees the
file descriptor and, if it is the last close, disarms the interrupt if the
IOCTLKEEPALIVE
state
is clear. Refer to the man pages for more information.
The following commands to
ioctl
are used to manipulate distributed interrupts. These
commands can also be applied to ETIs. All
ioctl
calls use the constants defined in
/usr/include/rcim.h
. Refer to the
rcim_distrib_intr(4)
man page for
more information.
DISTRIB_INTR_ARM
arms the DI
DISTRIB_INTR_DISARM
disarms the DI
DISTRIB_INTR_ENABLE
enables the DI
DISTRIB_INTR_DISABLE
disables the DI
DISTRIB_INTR_REQUEST
generates a software requested interrupt
DISTRIB_INTR_INFO
gets information about the DI
DISTRIB_INTR_WAIT
sleeps until the next DI
DISTRIB_INTR_WAKEUP
wakes up all sleeping processes
DISTRIB_INTR_KEEPALIVE
sets or clears keepalive state
DISTRIB_INTR_GETICNT
returns the number of times this DI has fired
DISTRIB_INTR_VECTOR
gets interrupt vector for the DI
IOCTLKEEPALIVE
sets or clears keepalive state (generic)
IOCTLGETICNT
returns the number of times this DI has fired (generic)
IOCTLVECNUM
sets interrupt vector for the DI (generic)
IOCTLSIGATTACH
requests a signal when an RCIM device generates an interrupt
Note that like ETIs, a distributed interrupt must be armed and enabled before an interrupt
can be received.
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Содержание RCIM I
Страница 105: ...RCIM User s Guide B 4 Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 109: ...Index 4 RCIM User s Guide Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 110: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Страница 111: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...