All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Lifeng Wang <lfwangcn@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] When startup the preemptive priority-base scheduling, at the start pont, I observed the output with wrong order.
Date: Tue, 13 Dec 2011 10:03:46 +0100	[thread overview]
Message-ID: <4EE714F2.4010600@domain.hid> (raw)
In-Reply-To: <CAO0Fu5Bh-PUZuyzL+hZWJJQ9wCJs8pmnZ6=+rkuVs0Xuc=1TxQ@mail.gmail.com>

On 12/13/2011 03:48 AM, Lifeng Wang wrote:
> Why is it not?
> Can someone tell me why and tell me how to write the correct code for the
> preemptive priority-base scheduling.

rt_printf does not preserve the order of prints between tasks. Besides
with rt_print_auto_init, the first rt_printf may cause a call to malloc,
which may cause a switch to secondary mode.

So you should not rely on what the test prints.

-- 
                                                                Gilles.


  reply	other threads:[~2011-12-13  9:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-13  2:48 [Xenomai-help] When startup the preemptive priority-base scheduling, at the start pont, I observed the output with wrong order Lifeng Wang
2011-12-13  9:03 ` Gilles Chanteperdrix [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-12-13  4:08 Lifeng Wang

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=4EE714F2.4010600@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=lfwangcn@domain.hid \
    --cc=xenomai@xenomai.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.