All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: "\"Hans Søndergaard (HSO)\"" <HSO@VIAUC.DK>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] How to get pid in Xenomai?
Date: Thu, 21 Aug 2008 14:21:17 +0200	[thread overview]
Message-ID: <48AD5DBD.5070606@domain.hid> (raw)
In-Reply-To: <2220D86D21B55040AB683933DBD97B5A263B7AAA98@domain.hid>

Hans Søndergaard (HSO) wrote:
> Hello.
> 1) Can you tell me, how to get the task id for the current (running) rt_task?
> I have tried to use getpid(), but this function always gives the same id as result.
> I am running several periodic rt_tasks and need their id's.

You can use rt_task_self() or pthread_self(), they will return a unique
pointer for the task. If you would like the Linux pid of the task, you
can do what cyclictest does, i.e. issue the gettid syscall.

> 
> 2) In Xenomai the priority inheritance protocol is implemented.
> Safety-Critical Java (http://jcp.org/en/jsr/detail?id=302) requires the priority ceiling emulation protocol.
> Have you any plan to implement and include this protocol in Xenomai?

Not that I know of, but it may be easy enough to implement, so I guess
your patch would be welcome.

-- 
                                                 Gilles.


      reply	other threads:[~2008-08-21 12:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-21 10:11 [Xenomai-help] How to get pid in Xenomai? Hans Søndergaard (HSO)
2008-08-21 12:21 ` Gilles Chanteperdrix [this message]

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=48AD5DBD.5070606@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=HSO@VIAUC.DK \
    --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.