All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philippe Gerum <rpm@xenomai.org>
To: "Hans-J. Ude" <ude@domain.hid>
Cc: Xenomai-help@domain.hid
Subject: Re: [Xenomai-help] Task lock/unlock unlock difficulties
Date: Tue, 08 Nov 2005 11:17:34 +0100	[thread overview]
Message-ID: <43707B3E.8060900@domain.hid> (raw)
In-Reply-To: <002f01c5e44a$b675bf50$1000000a@domain.hid>

Hans-J. Ude wrote:
> I need to lock/unlock the scheduler from time to time. I'm using the RTAI
> native skin in userspace and tried the rt_task_set_mode approach but was not
> very successfus yet. I've tried this:
> 
> int task_lock(void) { return rt_task_set_mode(0, T_LOCK, &mask); }
> int task_unlock(void) { return rt_task_set_mode(T_LOCK, mask, NULL); }
>
> To support nested calls to these functions i've implement an array of masks
> and lock/unlock counters to maintain a stack. I've also tried a single mask
> and no stack and with no mask at all. No success. It's hard to explain what
> exactly happens because I'm porting an existing software with a really bad
> design but the original works. I found there are xenomai functions called
> xnpod_lock_sched(), which are directly called from e.g. the vxWorks skin.
> Obviously xn_pod_lock has an integrated counting. Otherwise the vx skin
> would be incompatible. But when i include pod.h i get a whole bunch of error
> messages, likely due to missing defines. So can someone show me a way to a
> clean working counting lock/unlock mechanism.

Bypassing the interface won't help, especially if you think that there is an 
issue in the core. Please write a simple test case illustrating the use you want 
to make of sched locking using the native skin - which possibly exhibits the 
issue - and post it.

> 
> TAI,
> Hans
> 
> 
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
> 


-- 

Philippe.


  reply	other threads:[~2005-11-08 10:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-08  9:56 [Xenomai-help] Task lock/unlock unlock difficulties Hans-J. Ude
2005-11-08 10:17 ` Philippe Gerum [this message]
2005-11-09  9:45   ` Hans-J. Ude

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=43707B3E.8060900@domain.hid \
    --to=rpm@xenomai.org \
    --cc=Xenomai-help@domain.hid \
    --cc=ude@domain.hid \
    /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.