All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: alex alex <duch.alexandre@gmail.com>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] [Posix skin] program test with pthread_set_mode_np
Date: Tue, 22 Jan 2013 10:56:41 +0100	[thread overview]
Message-ID: <50FE6259.40406@xenomai.org> (raw)
In-Reply-To: <CAPpP=rM-0xrf5N9iKVq2S+7wRrD4LoHxMTUxnxYb6aYbNP9nEA@mail.gmail.com>

On 01/22/2013 10:41 AM, alex alex wrote:
> Hi,
>
> In the attached test program I test the scheduler lock operation with
> pthread_set_mode_np and the PTHREAD_LOCK_SCHED bit mask.
>
> Description:
> Two tasks are created.
> t1 lock the scheduler then load the cpu, sleep then load the cpu again but
> t2 task start when t1 sleep while the scheduler is locked. Why t1 is
> preempted?

Think of what would happen would a blocked task be allowed to keep the 
scheduler lock.

>
> I run on Xenomai 2.6.2 with linux kernel 3.2.21.
>
> Thanks in advance.
>
> Alex
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: test-pthread_set_mode_np.bz
> Type: application/octet-stream
> Size: 1302 bytes
> Desc: not available
> URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130122/97ba44e9/attachment.obj>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>


-- 
Philippe.


  reply	other threads:[~2013-01-22  9:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-22  9:41 [Xenomai] [Posix skin] program test with pthread_set_mode_np alex alex
2013-01-22  9:56 ` Philippe Gerum [this message]
2013-01-22 11:09   ` alex alex
2013-01-22 11:34     ` Philippe Gerum
2013-01-22 18:30       ` Gilles Chanteperdrix
2013-01-23 10:00         ` alex alex
2013-01-23 10:16         ` Philippe Gerum

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=50FE6259.40406@xenomai.org \
    --to=rpm@xenomai.org \
    --cc=duch.alexandre@gmail.com \
    --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.