All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] How to get pid in Xenomai?
@ 2008-08-21 10:11 Hans Søndergaard (HSO)
  2008-08-21 12:21 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Søndergaard (HSO) @ 2008-08-21 10:11 UTC (permalink / raw)
  To: xenomai@xenomai.org

[-- Attachment #1: Type: text/plain, Size: 515 bytes --]

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.

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?

Regards
Hans Sondergaard




[-- Attachment #2: Type: text/html, Size: 4044 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Xenomai-help] How to get pid in Xenomai?
  2008-08-21 10:11 [Xenomai-help] How to get pid in Xenomai? Hans Søndergaard (HSO)
@ 2008-08-21 12:21 ` Gilles Chanteperdrix
  0 siblings, 0 replies; 2+ messages in thread
From: Gilles Chanteperdrix @ 2008-08-21 12:21 UTC (permalink / raw)
  To: "Hans Søndergaard (HSO)"; +Cc: xenomai@xenomai.org

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-08-21 12:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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.