From: "haitaozhumail-disc@domain.hid" <haitaozhumail-disc@domain.hid>
To: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: [Xenomai-help] address spaces of real-time task and standard linux process
Date: Sun, 23 Oct 2011 13:25:52 -0700 (PDT) [thread overview]
Message-ID: <1319401552.9644.YahooMailNeo@domain.hid> (raw)
[-- Attachment #1: Type: text/plain, Size: 717 bytes --]
Hi All,
Do a standard Linux process and a real-time task (spawned by the standard Linux process with rt_task_create and rt_task_start ) share the same address space? More specifically, I have a C++ program like this:
Class A{
//Definition of a class A
};
RT_TASK demo_task;
void demo(void *arg){
A * pA = (A *)arg;
//Access the passed object via pA, e.g., pA->a...
}
int main(){
...
A *pA = new A;
rt_task_create(&demo_task, "realtime_task", 0, 50, 0);
rt_task_start(&demo_task, &demo, (void *)pA);
pause();
}
Can the function demo() correctly access the object created in main()? What if pA is a smart pointer defined in Boost library?
With Many Thanks,
Tom
[-- Attachment #2: Type: text/html, Size: 1217 bytes --]
next reply other threads:[~2011-10-23 20:25 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-10-23 20:25 haitaozhumail-disc [this message]
2011-10-24 16:25 ` [Xenomai-help] address spaces of real-time task and standard linux process Thomas Lockhart
-- strict thread matches above, loose matches on Subject: below --
2011-10-24 21:04 Tom Z
2011-10-25 8:06 ` Gilles Chanteperdrix
2011-10-25 10:50 ` Gilles Chanteperdrix
2011-10-26 14:13 ` Tom Z
2011-10-26 14:54 ` 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=1319401552.9644.YahooMailNeo@domain.hid \
--to=haitaozhumail-disc@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.