This file is indexed.

/usr/share/doc/libcomedi-dev/html/drivercallbacks.html is in libcomedi-dev 0.10.2-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>6.4.&#160; Callbacks, events and interrupts</title><link rel="stylesheet" type="text/css" href="comedilib.css"><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Comedi"><link rel="up" href="driverwriting.html" title="6.&#160; Writing a Comedi driver"><link rel="prev" href="boardspecific.html" title="6.3.&#160; Board-specific functionality"><link rel="next" href="drivercaveats.html" title="6.5.&#160; Device driver caveats"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">6.4.&#160;
Callbacks, events and interrupts
</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="boardspecific.html">Prev</a>&#160;</td><th width="60%" align="center">6.&#160;
Writing a <acronym class="acronym">Comedi</acronym> driver
</th><td width="20%" align="right">&#160;<a accesskey="n" href="drivercaveats.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="drivercallbacks"></a>6.4.&#160;
Callbacks, events and interrupts
</h3></div></div></div><p>
Continuous acquisition is tyically an
<span class="emphasis"><em>asynchronous</em></span> activity: the function call that
has set the acquisition in motion has returned before the acquisition
has finished (or even started). So, not only the acquired data must be
sent back to the user's buffer <span class="quote">&#8220;<span class="quote">in the background</span>&#8221;</span>, but
various types of asynchronous <span class="emphasis"><em>event handling</em></span> can
be needed during the acquisition:
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
The <span class="emphasis"><em>hardware</em></span> can generate some error or
warning events.
</p></li><li class="listitem"><p>
Normal functional interrupts are generated by the hardware, e.g.,
signalling the filling-up of the card's hardware buffer, or the end of
an acquisition <a class="link" href="index.html#scan">scan</a>, etc.
</p></li><li class="listitem"><p>
The device driver writer can register a driver-supplied
<span class="quote">&#8220;<span class="quote">callback</span>&#8221;</span> function, that is called at the end of each
hardware interrupt routine.
</p></li><li class="listitem"><p>
Another driver-supplied callback function is executed when the user
program launches an <code class="constant"><a class="link" href="inttrigconfiguration.html#insn-inttrig">INSN_INTTRIG</a></code>
instruction. This event handling is executed
<span class="emphasis"><em>synchronously</em></span> with the execution of the
triggering instruction.
</p></li></ul></div><p>
</p><p>
The interrupt handlers are registered through the functions mentioned
<a class="link" href="comedikernelgeneric.html#driversupportfunctions" title="6.2.2.&#160; Generic driver support functions">before</a>
The event handling is done in the existing <a class="ulink" href="http://www.comedi.org" target="_top"><acronym class="acronym">Comedi</acronym></a> drivers in
statements such as this one:
</p><pre class="programlisting">
<a name="async-events"></a>
   s-&gt;async-&gt;events |= COMEDI_CB_EOA | COMEDI_CB_ERROR
</pre><p>
It fills in the bits corresponding to particular events in the
<span class="type"><a class="link" href="comedikernelgeneric.html#comediasync" title="6.2.1.4.&#160; comedi_async">comedi_async</a></span> data structure.
The possible event bits are:
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
<a name="comedi-cb-eoa"></a>
<code class="constant">COMEDI_CB_EOA</code>: execute the callback at the
<span class="quote">&#8220;<span class="quote">End-Of-Acquisition</span>&#8221;</span> (or <span class="quote">&#8220;<span class="quote">End-Of-Output</span>&#8221;</span>).
</p></li><li class="listitem"><p>
<a name="comedi-cb-eos"></a>
<code class="constant">COMEDI_CB_EOS</code>: execute the callback at the
<span class="quote">&#8220;<span class="quote">End-Of-Scan</span>&#8221;</span>.
</p></li><li class="listitem"><p>
<a name="comedi-cb-overflow"></a>
<code class="constant">COMEDI_CB_OVERFLOW</code>: execute the callback when a
buffer overflow or underflow has occurred.
</p></li><li class="listitem"><p>
<a name="comedi-cb-error"></a>
<code class="constant">COMEDI_CB_ERROR</code>: execute the callback at the
occurrence of an (undetermined) error.
</p></li></ul></div><p>
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="boardspecific.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="driverwriting.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="drivercaveats.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">6.3.&#160;
Board-specific functionality
&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;6.5.&#160;
Device driver caveats
</td></tr></table></div></body></html>