public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Sergei Organov <osv@javad.com>
To: ecos-discuss@sources.redhat.com
Subject: [ECOS] Re: Thread suspend when scheduler is locked.
Date: Thu, 21 Jun 2012 11:51:00 -0000	[thread overview]
Message-ID: <jrv1rp$2t0$1@dough.gmane.org> (raw)
In-Reply-To: <4FE2F84F.2040801@calivar.com>

Nick Garnett <nickg@calivar.com> writes:

> On 21/06/12 10:00, Sergei Organov wrote:
>> 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.
>
>

[...]

> Essentially locking the scheduler yourself is like running in a DSR,
> there is only a limited number of calls it makes sense to use, and their
> effects may be deferred until the scheduler lock returns to zero.

So, there is no way in eCos to just disable _preemption_? I.e.,
(temporarily) switch from preemptive to cooperative multi-threading?

-- 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

  reply	other threads:[~2012-06-21 11:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-20 18:23 [ECOS] " Sergei Organov
2012-06-21  9:00 ` [ECOS] " Sergei Organov
2012-06-21 10:33   ` Nick Garnett
2012-06-21 11:51     ` Sergei Organov [this message]
2012-06-21 12:48       ` Nick Garnett
2012-06-21 14:57         ` Sergei Organov
2012-07-01  2:45           ` Jonathan Larmour
2012-07-02 10:13             ` Sergei Organov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jrv1rp$2t0$1@dough.gmane.org' \
    --to=osv@javad.com \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).