From: Jan Kiszka <jan.kiszka@domain.hid>
To: xenomai@xenomai.org
Subject: [Xenomai-core] [PATCH 3/6] POSIX: Optimize pthread_setschedparam fast path
Date: Mon, 15 Dec 2008 15:34:36 +0100 [thread overview]
Message-ID: <20081215143436.15493.65646.stgit@domain.hid> (raw)
In-Reply-To: <20081215143435.15493.94798.stgit@domain.hid>
Optimize __wrap_pthread_setschedparam without HAVE___THREAD for the case
that an already mapped shadow is modifying its own scheduling
parameters.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
src/skins/posix/thread.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/src/skins/posix/thread.c b/src/skins/posix/thread.c
index 2ecb64f..d2839c6 100644
--- a/src/skins/posix/thread.c
+++ b/src/skins/posix/thread.c
@@ -37,11 +37,10 @@ static int linuxthreads;
int __wrap_pthread_setschedparam(pthread_t thread,
int policy, const struct sched_param *param)
{
- pthread_t myself = pthread_self();
unsigned long *mode_buf = NULL;
int err, promoted;
- if (thread == myself) {
+ if (xeno_current != XN_NO_HANDLE && thread == pthread_self()) {
#ifdef HAVE___THREAD
mode_buf = xeno_init_current_mode();
#else /* !HAVE___THREAD */
next prev parent reply other threads:[~2008-12-15 14:34 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 14:34 [Xenomai-core] [PATCH 0/6] Various fixes and cleanups Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 1/6] Handle priority changes of SCHED_RR tasks Jan Kiszka
2008-12-15 14:44 ` Gilles Chanteperdrix
2008-12-15 14:54 ` Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 2/6] POSIX: Fix initialization of SCHED_RR threads Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 4/6] Mark libs nodlopen on initial-exec TLS Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 5/6] Replace --without-__tread with --enable-dlopen-skins Jan Kiszka
2008-12-15 14:34 ` Jan Kiszka [this message]
2008-12-15 14:46 ` [Xenomai-core] [PATCH 3/6] POSIX: Optimize pthread_setschedparam fast path Gilles Chanteperdrix
2008-12-15 14:50 ` Jan Kiszka
2008-12-15 15:01 ` Gilles Chanteperdrix
2008-12-15 15:08 ` Jan Kiszka
2008-12-15 14:34 ` [Xenomai-core] [PATCH 6/6] POSIX: Do not auto-shadow main with dlopen enabled Jan Kiszka
2008-12-15 16:25 ` [Xenomai-core] [PATCH 0/6] Various fixes and cleanups Philippe Gerum
2008-12-15 16:34 ` Jan Kiszka
2008-12-15 16:50 ` Philippe Gerum
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=20081215143436.15493.65646.stgit@domain.hid \
--to=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.