From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: alex alex <duch.alexandre@gmail.com>
Cc: Xenomai <xenomai@xenomai.org>
Subject: Re: [Xenomai] [QUESTION] thread creation and hook function
Date: Sun, 14 Apr 2013 01:05:15 +0200 [thread overview]
Message-ID: <5169E4AB.9030808@xenomai.org> (raw)
In-Reply-To: <CAPpP=rMOmOkd2Gwswu685zsPhxJDMj7GnRWA0yU+gRHmz=V2bw@mail.gmail.com>
On 04/14/2013 12:41 AM, alex alex wrote:
> linux kernel : 3.2.21
> xenomai version : 2.6.2.1
> arch: x86
>
> In fact, I base on the cookie of the "rt_task_add_hook" function to
> retrieve the descriptor address of the task which has been switched or
> started.
> And I guess that if the returned name is ROOT it's means that either the
> task is switched to secondary mode or it's another linux task and if the
> retuned name isn't ROOT it mean that it's a task in the xenomai scheduler.
Yes, but as I told you ROOT does not necessarily means that a real-time
thread is running in secondary mode.
Also, as I also told you, if you want why a thread switches to secondary
mode, see examples/sigdebug.c
I do not intend to run your example and understand what it does. The way
you try to understand what happens is too indirect and convoluted.
There are simple ways in the application itself, you do not need a
kernel module and a switch hook.
--
Gilles.
next prev parent reply other threads:[~2013-04-13 23:05 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-13 16:58 [Xenomai] [QUESTION] thread creation and hook function alex alex
2013-04-13 17:41 ` Gilles Chanteperdrix
2013-04-13 18:20 ` alex alex
2013-04-13 20:55 ` Gilles Chanteperdrix
2013-04-13 22:41 ` alex alex
2013-04-13 23:05 ` Gilles Chanteperdrix [this message]
2013-04-13 23:07 ` Gilles Chanteperdrix
2013-04-13 23:37 ` Gilles Chanteperdrix
2013-04-15 8:47 ` alex alex
2013-04-15 9:14 ` Philippe Gerum
2013-04-15 10:25 ` alex alex
2013-04-15 12:36 ` Philippe Gerum
2013-04-15 13:05 ` Philippe Gerum
2013-04-15 13:08 ` Philippe Gerum
2013-04-15 13:43 ` alex alex
2013-04-15 13:48 ` alex alex
2013-04-15 14:06 ` Philippe Gerum
[not found] ` <CAPpP=rMsqp5SOfq8_dNUOZ5UFugNa-YwsLyT5WT4d01_UTWRMA@mail.gmail.com>
2013-04-15 14:27 ` Philippe Gerum
2013-04-15 19:45 ` Gilles Chanteperdrix
2013-04-16 7:03 ` Philippe Gerum
2013-04-15 19:43 ` 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=5169E4AB.9030808@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.