From: Anders Blomdell <anders.blomdell@domain.hid>
To: rpm@xenomai.org
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] What is permanent memory (rt_task_shadow)
Date: Fri, 24 Nov 2006 14:31:42 +0100 [thread overview]
Message-ID: <4566F43E.1070205@domain.hid> (raw)
In-Reply-To: <1164371134.4973.39.camel@domain.hid>
Philippe Gerum wrote:
> On Fri, 2006-11-24 at 12:46 +0100, Anders Blomdell wrote:
>> The documentation for rt_task_shadow says:
>>
>> task The address of a task descriptor Xenomai will use to store the
>> task-related data. This descriptor must always be valid while
>> the task is active therefore it must be allocated in permanent
>> memory.
>>
>> Is it correct to assume that it is OK to the following:
>>
>> void func() {
>> RT_TASK task;
>> int err;
>>
>> err = rt_task_shadow(&task, ...);
>> ... Realtime activities ...
>> if (err == 0) {
>> rt_task_delete(&task);
>> }
>> }
>
> Yes, even if it relies on the assumption that func() will never unwind
> its stack space before it self-destroys.
OK, good. Follow-up question:
Is there any way to do the inverse of rt_task_shadow (since
the answer above implies that rt_task_delete will destroy the
linux task as well)?
Regards
Anders Blomdell
--
Anders Blomdell Email: anders.blomdell@domain.hid
Department of Automatic Control
Lund University Phone: +46 46 222 4625
P.O. Box 118 Fax: +46 46 138118
SE-221 00 Lund, Sweden
next prev parent reply other threads:[~2006-11-24 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-11-24 11:46 [Xenomai-help] What is permanent memory (rt_task_shadow) Anders Blomdell
2006-11-24 12:25 ` Philippe Gerum
2006-11-24 13:31 ` Anders Blomdell [this message]
2006-11-24 13:47 ` 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=4566F43E.1070205@domain.hid \
--to=anders.blomdell@domain.hid \
--cc=rpm@xenomai.org \
--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.