* [Xenomai-core] [PATCH] nucleus: Remove xnshadow_relax from taskexit hook
@ 2009-03-08 11:20 Jan Kiszka
2009-03-09 9:27 ` [Xenomai-core] [PATCH] nucleus: Cleanup " Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-03-08 11:20 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai-core
This is no longer needed as do_exit, the caller of this hook, always
runs in secondary mode. Enforce this assumptions by leaving a XENO_BUGON
behind.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/nucleus/shadow.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index e2f2968..66943ba 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -2179,12 +2179,11 @@ static inline void do_taskexit_event(struct task_struct *p)
if (!thread)
return;
+ XENO_BUGON(NUCLEUS, xnpod_shadow_p());
+
if (xnthread_test_state(thread, XNDEBUG))
unlock_timers();
- if (xnpod_shadow_p())
- xnshadow_relax(0);
-
magic = xnthread_get_magic(thread);
xnlock_get_irqsave(&nklock, s);
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Xenomai-core] [PATCH] nucleus: Cleanup taskexit hook
2009-03-08 11:20 [Xenomai-core] [PATCH] nucleus: Remove xnshadow_relax from taskexit hook Jan Kiszka
@ 2009-03-09 9:27 ` Jan Kiszka
2009-03-09 10:24 ` [Xenomai-core] [PATCH v2] " Jan Kiszka
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-03-09 9:27 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai-core
[ Enhanced version, removing more unneeded code. ]
xnshadow_relax is no longer needed as do_exit, the caller of this hook,
always runs in secondary mode, ie. over the ROOT thread. Enforce this
assumptions by leaving a XENO_BUGON behind.
And as the target thread is relaxed already, ie. suspended, there is
also no need for a reschedule. Drop the related code.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/nucleus/shadow.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index e2f2968..1f90054 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -2179,12 +2179,11 @@ static inline void do_taskexit_event(struct task_struct *p)
if (!thread)
return;
+ XENO_BUGON(NUCLEUS, !xnpod_root_p());
+
if (xnthread_test_state(thread, XNDEBUG))
unlock_timers();
- if (xnpod_shadow_p())
- xnshadow_relax(0);
-
magic = xnthread_get_magic(thread);
xnlock_get_irqsave(&nklock, s);
@@ -2193,9 +2192,10 @@ static inline void do_taskexit_event(struct task_struct *p)
xnthread_archtcb(thread)->user_task = NULL;
/* xnpod_delete_thread() -> hook -> xnshadow_unmap(). */
xnpod_delete_thread(thread);
- xnsched_set_resched(thread->sched);
xnlock_put_irqrestore(&nklock, s);
- xnpod_schedule();
+
+ /* The deleted thread was suspended (relaxed), so there is no need for
+ reschedule. */
xnshadow_dereference_skin(magic);
trace_mark(xn_nucleus, shadow_exit, "thread %p thread_name %s",
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Xenomai-core] [PATCH v2] nucleus: Cleanup taskexit hook
2009-03-09 9:27 ` [Xenomai-core] [PATCH] nucleus: Cleanup " Jan Kiszka
@ 2009-03-09 10:24 ` Jan Kiszka
2009-03-09 11:34 ` [Xenomai-core] Xenosim Vandana Sasidharan
0 siblings, 1 reply; 6+ messages in thread
From: Jan Kiszka @ 2009-03-09 10:24 UTC (permalink / raw)
To: Philippe Gerum; +Cc: xenomai-core
[ Updated according to discussion. ]
xnshadow_relax is no longer needed as do_exit, the caller of this hook,
always runs in secondary mode, ie. over the ROOT thread. Enforce this
assumptions by leaving a XENO_BUGON behind.
And as the target thread is relaxed already, ie. suspended, there is
also no need for explicit reschedule. But keep xnpod_schedule for the
case the exit hook caused a prio change to the ROOT thread.
Signed-off-by: Jan Kiszka <jan.kiszka@domain.hid>
---
ksrc/nucleus/shadow.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index e2f2968..416e675 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -2179,12 +2179,11 @@ static inline void do_taskexit_event(struct task_struct *p)
if (!thread)
return;
+ XENO_BUGON(NUCLEUS, !xnpod_root_p());
+
if (xnthread_test_state(thread, XNDEBUG))
unlock_timers();
- if (xnpod_shadow_p())
- xnshadow_relax(0);
-
magic = xnthread_get_magic(thread);
xnlock_get_irqsave(&nklock, s);
@@ -2193,7 +2192,6 @@ static inline void do_taskexit_event(struct task_struct *p)
xnthread_archtcb(thread)->user_task = NULL;
/* xnpod_delete_thread() -> hook -> xnshadow_unmap(). */
xnpod_delete_thread(thread);
- xnsched_set_resched(thread->sched);
xnlock_put_irqrestore(&nklock, s);
xnpod_schedule();
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Xenomai-core] Xenosim
2009-03-09 10:24 ` [Xenomai-core] [PATCH v2] " Jan Kiszka
@ 2009-03-09 11:34 ` Vandana Sasidharan
2009-03-09 13:23 ` Gilles Chanteperdrix
0 siblings, 1 reply; 6+ messages in thread
From: Vandana Sasidharan @ 2009-03-09 11:34 UTC (permalink / raw)
To: xenomai-core
[-- Attachment #1: Type: text/plain, Size: 657 bytes --]
Hi
Can anyone tell me what tool chain is required to build a test set-up for
the xenosim simulator?
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
[-- Attachment #2: Type: text/html, Size: 756 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Xenomai-core] Xenosim
2009-03-09 11:34 ` [Xenomai-core] Xenosim Vandana Sasidharan
@ 2009-03-09 13:23 ` Gilles Chanteperdrix
2009-03-10 3:09 ` Vandana Sasidharan
0 siblings, 1 reply; 6+ messages in thread
From: Gilles Chanteperdrix @ 2009-03-09 13:23 UTC (permalink / raw)
To: Vandana Sasidharan; +Cc: xenomai-core
Vandana Sasidharan wrote:
> Hi
> Can anyone tell me what tool chain is required to build a test set-up for
> the xenosim simulator?
1- we already answered this question;
2- your are replying to a mail which is unrelated, for us people which
use references-aware mailers, this makes your mail appear in an
unexpected place;
3- the fact that you are sending this mail on a public mailing list make
the disclaimer your company attached to this mail irrelevant: if you are
sending confidential information, then it is stupid to send them to a
public mailing list, if not, then the disclaimer is irrelevant, left
alone the fact that it is so ridiculously long;
So, since you depise so much the netiquette, I will not answer you.
Sorry. Maybe other people will.
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
--
Gilles.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2009-03-10 3:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-08 11:20 [Xenomai-core] [PATCH] nucleus: Remove xnshadow_relax from taskexit hook Jan Kiszka
2009-03-09 9:27 ` [Xenomai-core] [PATCH] nucleus: Cleanup " Jan Kiszka
2009-03-09 10:24 ` [Xenomai-core] [PATCH v2] " Jan Kiszka
2009-03-09 11:34 ` [Xenomai-core] Xenosim Vandana Sasidharan
2009-03-09 13:23 ` Gilles Chanteperdrix
2009-03-10 3:09 ` Vandana Sasidharan
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.