This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Thread suspend when scheduler is locked.
- From: Sergei Organov <osv at javad dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Thu, 21 Jun 2012 13:00:12 +0400
- Subject: [ECOS] Re: Thread suspend when scheduler is locked.
- References: <jrt4dg$ee8$1@dough.gmane.org>
A few clarifications below.
Sergei Organov <osv@javad.com> writes:
> Hello,
>
> In the following sequence:
>
> cyg_scheduler_lock();
> cyg_thread_suspend(thread);
>
> the second call returns immediately that is very surprising. Is it a bug
> or fature?
1. 'thread' is the current thread being executed so the suspend call asks
thread for suspending itself.
2. cyg_thread_delay(delay) returns immediately no matter what is 'delay'
value.
3. On the other hand, waiting on a primitive such as closed semaphore
works fine.
Looks like a bug to me.
-- Sergei.
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss