This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Question about cyg_flag_timed_wait()


On 2009-11-02, Grant Edwards <grant.b.edwards@gmail.com> wrote:

> A colleague working on an eCos app is reporting that
> cyg_flag_timed_wait() doesn't resume immediately when the flag
> is set.  He says it won't resume until the next system tick
> (which results in a delay of up to 10ms). So instead he uses
> cyg_thread_delay() and cyg_thread_release() and claims that the
> released thread starts immediately in that case.

This "problem" seems to have come up again.  I've looked at the
event flag code, and I can't see how there could be a delay
when waking a thread using cyg_thread_setbits() and not when
waking a thread using cyg_thread_release().

Both cases just end up calling the target thread's wake()
method.  The only difference is that cyg_thread_release() calls
wake() unconditionally, and cyg_thread_setbits() only calls it
if the target thread is in the flag's waitqueue.

I'm not wrong am I?

-- 
Grant Edwards                   grante             Yow! What GOOD is a
                                  at               CARDBOARD suitcase ANYWAY?
                               visi.com            


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]