All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Jan Kiszka <jan.kiszka@domain.hid>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Native skin: user space handles sharable between processes?
Date: Mon, 25 Aug 2008 14:21:34 +0200	[thread overview]
Message-ID: <48B2A3CE.1080205@domain.hid> (raw)
In-Reply-To: <48B2A2B2.9070609@domain.hid>

Jan Kiszka wrote:
> Gilles Chanteperdrix wrote:
>> Jan Kiszka wrote:
>>> Hi,
>>>
>>> what is the policy for the user space handles the native skin generates:
>>> Can the user share them between processes via putting them into shared
>>> memory (like it is allowed for some POSIX objects)?
>>>
>>> I'm wondering if I have to use the POSIX pattern to resolve the address
>>> of a fast mutex: If shared, look to global heap, otherwise use
>>> process-local heap.
>> The posix skin does only this only the first time. If the address is
>> local, it is computed and stored locally and never recomputed again.
> 
> What remains is "if (shadow->attr.pshared) ...", so a condition + some
> bit in the shadow data structure.
> 
> I could merged that bit into the lowest bit of the lock pointer, OK, but
> would still have to check for it. If native defines that a handle is
> only valid within the process that obtained it, I could skip that dance
> altogether.

Ok. I understand what you mean. I wanted to work this around for the
POSIX API, but let us consider a real-life fact: the process-shared
objects are a corner-case. So, let us not spend too much sweat on it.

-- 
                                                 Gilles.


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-25 11:36 [Xenomai-core] Native skin: user space handles sharable between processes? Jan Kiszka
2008-08-25 12:08 ` Gilles Chanteperdrix
2008-08-25 12:16   ` Jan Kiszka
2008-08-25 12:21     ` Gilles Chanteperdrix [this message]
2008-08-25 12:23       ` Jan Kiszka

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=48B2A3CE.1080205@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=jan.kiszka@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.