All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: "Moser, Dan" <DMoser@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] xenoami task pids
Date: Tue, 14 Mar 2006 23:30:24 +0100	[thread overview]
Message-ID: <44174400.3010803@domain.hid> (raw)
In-Reply-To: <067C9A1F6AFEB643895EA4513E116884178FBD@exfp1.Railpowertech.local>

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

Moser, Dan wrote:
> Hi,
> 
> I am a Linux and Xenomai newbie.
> 
> I have two separate Xenomai 2.1-rc4 environments, one I built with
> Gentoo running under VMware (WindowsXP Host) and another (that somebody
> else built sometime in the recent past) with Gentoo running native on a
> PC.
> 
> I have identical code (and Makefile) that simply executes an
> rt_task_create(), rt_task_set_periodic(), and rt_task_start() and runs
> (seemingly) proper on both boxes.
> 
> But:
> 
> On one box, the main thread and the Xenomai task thread have DIFFERENT
> pids (reported via a call to getpid()).  On the other box, the main
> thread and the Xenomai task thread have the SAME pid (again, reported
> via a call to getpid()).

getpid = get process id, not thread id (there is pthread_self() for this).

My blind guess is that you are running linux_threads on the one machine
and NPTL threads on the other. Those are the libraries providing POSIX
thread support to the application, and this is also what Xenomai uses as
platform for its RT-threads. The first (older) library maps threads on
light-weight processes, the latter (NPTL) on real threads. Thus you get
a new id in the first and the same id in the second case. Again, just a
guess, I never stumbled over this behaviour consciously.

> 
> Is there some sort of Xenomai and/or application config/build option
> that controls this behavior?
> 
> Thanks in advance,
> Dan
> 

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-03-14 22:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-14 21:50 [Xenomai-help] xenoami task pids Moser, Dan
2006-03-14 22:30 ` Jan Kiszka [this message]
2006-03-15 13:29 ` Philippe Gerum
  -- strict thread matches above, loose matches on Subject: below --
2006-03-16 13:47 Moser, Dan

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=44174400.3010803@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=DMoser@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.