All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] [PATCH] posix: Skip auto-shadowing if current thread is already shadowed
Date: Thu, 13 Jun 2013 06:23:23 +0200	[thread overview]
Message-ID: <51B9493B.7070000@siemens.com> (raw)
In-Reply-To: <51B948AE.6060708@siemens.com>

On 2013-06-13 06:21, Jan Kiszka wrote:
> On 2013-06-12 13:06, Gilles Chanteperdrix wrote:
>> On 06/12/2013 08:15 AM, Jan Kiszka wrote:
>>
>>> While the user can also avoid double shadowing by providing the
>>> XENO_NOSHADOW environment variable, there is still no reason to attempt
>>> auto-shadowing in their absence if the current thread is already a
>>> Xenomai thread. This helps, e.g., in complex dlopen scenarios where
>>> the POSIX lib is pulled in belatedly, potentially after some other lib
>>> already shadowed the dlopen caller.
>>
>>
>> Well, last time I checked, calling __wrap_pthread_setschedparam for an
>> already shadowed threads was a nop.
> 
> I'm getting an EBUSY from xnshadow_map as called by __pthread_shadow.
> And that, of course, lets the lib init code bail out.

BTW, the test pattern is pretty simple:

main()
{
	...
	rt_task_shadow(&task, "test", 0, 0);
	handle = dlopen("libpthread_rt.so", RTLD_LAZY);
	...
}

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux


  reply	other threads:[~2013-06-13  4:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-12  6:15 [Xenomai] [PATCH] posix: Skip auto-shadowing if current thread is already shadowed Jan Kiszka
2013-06-12 11:06 ` Gilles Chanteperdrix
2013-06-13  4:21   ` Jan Kiszka
2013-06-13  4:23     ` Jan Kiszka [this message]
2013-07-26 17:54 ` Jan Kiszka
2013-07-26 19:12   ` Gilles Chanteperdrix

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=51B9493B.7070000@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=gilles.chanteperdrix@xenomai.org \
    --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.