This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Question about cyg_flag_timed_wait()
- From: Grant Edwards <grant dot b dot edwards at gmail dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Wed, 23 Dec 2009 16:01:01 +0000 (UTC)
- Subject: [ECOS] Re: Question about cyg_flag_timed_wait()
- References: <hcn35s$550$1@ger.gmane.org>
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