Hi John,
> We're in agreement on one issue but not the other.
> We agree that g() should be called after servicing the
> request.
Ok, good. I think this should be explicitly stated.
> But we slightly disagree on the meaning of the pending flag.
> The original idea is that the pending flag reflects the
> status of the message queues at the time ::ServiceLoop() was
> called. So, if there was 1 message at the time ::ServiceLoop()
> was called, the message is serviced, then g() is called.
That's fine with me, although I had never guessed this was
the intent from reading the text :-) I think we should
explicitly state this as well.
This leads to another nit: what should the value of pending
be for the case where there are no messages pending on the HW
side when ServiceLoop() is called, but a message happens
to become pending between ServiceLoop() is entered and it
polls the port for pending messages? If I follow your
intent to the letter pending should be false in this case.
Furthermore, if g() is setup to cause ServiceLoop() to
actually loop multiple times, how should pending be set
for the subsequent iterations? Does it make sense to generalize
what you said to say that the pending flag reflects the status
of the message queues at the start of each iteration of the
internal loop in ServiceLoop()?
I'm thinking that pending should be true on invocation of g()
if messages/service requests are known to be pending at this
time and/or service requests were processed since last
invocation of g() or Init() if there was no previous g()
invocation.
> Assuming that 'pending' reflects the message status upon entry
> to ::ServiceLoop() as I described above, I don't agree. I think
> the example should work correctly.
I agree except for the nit above. I think the nit can be
taken care of by referring to what happens between invocations
of g() as I described. Note, I know that this is slightly
complicated by the possibility of a NULL g().
Per
-- Per Bojsen Email: <bojsen@zaiqtech.com> Zaiq Technologies, Inc. WWW: http://www.zaiqtech.com 78 Dragon Ct. Tel: 781 721 8229 Woburn, MA 01801 Fax: 781 932 7488Received on Wed Mar 24 22:13:35 2004
This archive was generated by hypermail 2.1.8 : Wed Mar 24 2004 - 22:13:39 PST