[En-Nut-Discussion] Event Question

Ralph Mason ralph.mason at telogis.com
Fri May 16 21:53:49 CEST 2003


I think afterwards that I realised the reason for it. That you need to
search the queue anyway so you might as well get passed the que, most of the
time the thread is going to be the first one in the que.


I wasn't thinking of doubly linking the lists, I was thinking of introducing
and Event that was pointed to by the thread.

I did notice that in NutEventTimeout   tqpp  is marked  *volatile *, I don't
think it is volatile in this function because nothing else will ever change
it while this function is running as the Timer interrupts never enabled
interrupts.

Ralph


> -----Original Message-----
> From: en-nut-discussion-admin at egnite.de
> [mailto:en-nut-discussion-admin at egnite.de]On Behalf Of Harald Kipp
> Sent: Friday, 16 May 2003 11:10
> To: en-nut-discussion at egnite.de
> Subject: Re: [En-Nut-Discussion] Event Question
>
>
> Well, it's some months ago I dived into this part of the code.
>
> In case of a timeout, the thread has to be removed from this
> event queue. This requires to modify the td_qnxt of the thread
> in front. But Nut/OS maintains a single linked list only and
> can walk up a queue, but not down.
>
> I have no idea, what it would mean to change queues to double
> linked lists. But I assume a loss of performance in many other
> parts of the queue handling code. We may also take into account,
> that timeouts are the special case in most applications.
>
> Harald
>
>
> >It seems that passing the running thread would probably be
> better since then
> >it doesn't have to search the queue for the thread when the
> timer expires.
> >
> >But I cant help but feel there is some good reason for this that I am
> >missing.
> >
> >Thanks
> >Ralph
> >---
> >Outgoing mail is certified Virus Free.
> >Checked by AVG anti-virus system (http://www.grisoft.com).
> >Version: 6.0.480 / Virus Database: 276 - Release Date: 12/05/2003
> >
> >_______________________________________________
> >En-Nut-Discussion mailing list
> >En-Nut-Discussion at egnite.de
> >http://www.egnite.de/mailman/listinfo/en-nut-discussion
>
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo/en-nut-discussion
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.480 / Virus Database: 276 - Release Date: 12/05/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.480 / Virus Database: 276 - Release Date: 12/05/2003




More information about the En-Nut-Discussion mailing list