<html>
<head>
</head>
<body>
   You are right. Sending the event if the queue was not originally empty
when the ISR came is not necessary. I was already looping the task until
the queue was empty; I was, however, sending the event regardless -- which
is actually wasting CPU cycles. Thanks for the tip? I'll see what I can get
the interval down to by not sending an unnecessary event.<br>
<br>
Chris Johns wrote:<br>
<blockquote type="cite" cite="mid:3C784A08.B8858476@cybertec.com.au">
  <pre wrap="">Angelo Fraietta wrote:<br></pre>
  <blockquote type="cite">
    <pre wrap="">Within the ISR I am doing the following:<br><br>Reading a 16 bit word from an I/O address<br>Decoding and adding that word onto a queue that is emptied out by a<br>running task<br>Checking a second queue for data that needs to be transmitted<br>Transmitting a word to the I/O card.<br>Setting an event that causes the running task to empty the queue.<br><br></pre>
    </blockquote>
    <pre wrap=""><!----><br>I would only send the event if the queue is empty and have the task loop<br>until the queue is empty.<br> <br><br></pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="$mailwrapcol">-- 
Angelo Fraietta

PO Box 859
Hamilton NSW 2303

Home Page


<a class="moz-txt-link-freetext" href="http://www.users.bigpond.com/angelo_f/">http://www.users.bigpond.com/angelo_f/</a>

There are those who seek knowledge for the sake of knowledge - that is CURIOSITY
There are those who seek knowledge to be known by others - that is VANITY
There are those who seek knowledge in order to serve - that is LOVE
    Bernard of Clairvaux (1090 - 1153)</pre>
    <br>
    </body>
    </html>