From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: alex alex <duch.alexandre@gmail.com>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] [Posix] I/O multiplexing with select
Date: Thu, 09 May 2013 19:52:43 +0200 [thread overview]
Message-ID: <518BE26B.4080408@xenomai.org> (raw)
In-Reply-To: <CAPpP=rN8hCBkm17e4X_Oqpt9p306kSh_hQQW9LKifbkqzd6zOQ@mail.gmail.com>
On 05/09/2013 06:56 PM, alex alex wrote:
> vmlinux file
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: vmlinux
> Type: application/octet-stream
> Size: 11189780 bytes
> Desc: not available
> URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130509/0255686a/attachment.obj>
> _______________________________________________
> Xenomai mailing list
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>
Please try that one instead:
diff --git a/ksrc/skins/posix/syscall.c b/ksrc/skins/posix/syscall.c
index 49ed764..6fbe4c4 100644
--- a/ksrc/skins/posix/syscall.c
+++ b/ksrc/skins/posix/syscall.c
@@ -435,11 +435,6 @@ static int __pthread_set_name_np(struct pt_regs *regs)
hkey.u_tid = __xn_reg_arg1(regs);
hkey.mm = current->mm;
k_tid = __pthread_find(&hkey);
- if (k_tid) {
- p = xnthread_user_task(&k_tid->threadbase);
- strncpy(p->comm, name, sizeof(p->comm));
- p->comm[sizeof(p->comm) - 1] = '\0';
- }
return -pthread_set_name_np(k_tid, name);
}
diff --git a/ksrc/skins/posix/thread.c b/ksrc/skins/posix/thread.c
index 01fc699..78f5634 100644
--- a/ksrc/skins/posix/thread.c
+++ b/ksrc/skins/posix/thread.c
@@ -715,6 +715,9 @@ int pthread_set_mode_np(int clrmask, int setmask)
*/
int pthread_set_name_np(pthread_t thread, const char *name)
{
+#ifdef CONFIG_XENO_OPT_PERVASIVE
+ struct task_struct *p;
+#endif /* CONFIG_XENO_OPT_PERVASIVE */
spl_t s;
xnlock_get_irqsave(&nklock, s);
@@ -727,6 +730,14 @@ int pthread_set_name_np(pthread_t thread, const char *name)
snprintf(xnthread_name(&thread->threadbase), XNOBJECT_NAME_LEN, "%s",
name);
+#ifdef CONFIG_XENO_OPT_PERVASIVE
+ p = xnthread_user_task(&thread->threadbase);
+ if (p) {
+ strncpy(p->comm, name, sizeof(p->comm));
+ p->comm[sizeof(p->comm) - 1] = '\0';
+ }
+#endif /* CONFIG_XENO_OPT_PERVASIVE */
+
xnlock_put_irqrestore(&nklock, s);
return 0;
--
Gilles.
next prev parent reply other threads:[~2013-05-09 17:52 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-08 13:53 [Xenomai] [Posix] I/O multiplexing with select alex alex
2013-05-08 14:19 ` Gilles Chanteperdrix
2013-05-08 20:34 ` alex alex
2013-05-08 20:49 ` Gilles Chanteperdrix
2013-05-08 21:30 ` alex alex
2013-05-09 9:30 ` alex alex
2013-05-09 11:45 ` Gilles Chanteperdrix
2013-05-09 13:13 ` alex alex
2013-05-09 13:26 ` Gilles Chanteperdrix
2013-05-09 14:09 ` alex alex
2013-05-09 14:14 ` Gilles Chanteperdrix
[not found] ` <CAPpP=rMLPeRAVCpdKQkLVD29pFUj8zPL5JRmTbrJkKEetJJbew@mail.gmail.com>
2013-05-09 14:51 ` alex alex
2013-05-09 14:54 ` Gilles Chanteperdrix
[not found] ` <CAPpP=rNFf4qH0JPpR57i5qp1tmHbLb2k8X9qYjn+6dmZb_ckvA@mail.gmail.com>
[not found] ` <518BBFDC.7060102@xenomai.org>
2013-05-09 15:35 ` alex alex
2013-05-09 15:37 ` Gilles Chanteperdrix
2013-05-09 15:46 ` alex alex
2013-05-09 15:49 ` Gilles Chanteperdrix
[not found] ` <CAPpP=rPFd3h_aTBKoL6bUwAqbLT5yDp0G057h1PssUo8MVKxDg@mail.gmail.com>
[not found] ` <518BCB6B.5070908@xenomai.org>
[not found] ` <CAPpP=rNs37xZRsJRd3JvS4Pf16jhRWmxsS+Y6gVR=R9RQ6SWjQ@mail.gmail.com>
[not found] ` <518BCD6C.8060501@xenomai.org>
[not found] ` <CAPpP=rODvDuVjP+CfE=6jYTRP5nD5smumnAV3mj51YQm8mzw0Q@mail.gmail.com>
2013-05-09 16:44 ` alex alex
2013-05-09 16:45 ` Gilles Chanteperdrix
2013-05-09 16:56 ` alex alex
2013-05-09 17:15 ` Gilles Chanteperdrix
2013-05-09 17:52 ` Gilles Chanteperdrix [this message]
2013-05-11 13:11 ` alex alex
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=518BE26B.4080408@xenomai.org \
--to=gilles.chanteperdrix@xenomai.org \
--cc=duch.alexandre@gmail.com \
--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.