* [Xenomai-help] Detect switch in secondary mode + mlockall = bug?
@ 2011-01-24 9:54 Charles Clerdan
2011-01-24 12:26 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Charles Clerdan @ 2011-01-24 9:54 UTC (permalink / raw)
To: xenomai, armadeus-forum
[-- Attachment #1: Type: text/plain, Size: 1056 bytes --]
Hi,
I'm trying to catch the signal SIGXCPU, in order to know when a task goes in
secondary mode.
I would like to know, why I have to comment the fonction mlockall.
PS : The problem is not related to the Code, but, there is a piece of it :
#include "config.h"
#include <native/task.h>
#include <stdio.h>
#include <assert.h>
#include <signal.h>
void WorkingTask (void* cookie)
{
while (1) {};
}
static RT_TASK Rt_Work_Task;
void go (void * cookie)
{
printf("Test for switch : %d\r\n",(int)rt_task_self());
}
void warn_upon_switch(int sig __attribute__((unused)))
{
printf("/!\\ Secondary Mode /!\\ : ");
}
int main (void)
{
RT_TASK Rt_main_task;
int erreur;
/* Pagination Locked */
// mlockall( MCL_CURRENT | MCL_FUTURE ); <- This is the line which makes
my question
signal(SIGXCPU, warn_upon_switch);
/* Real-Time Task */
rt_task_spawn (&Rt_main_task, "go", 2048, 20, T_FPU | T_JOINABLE,
&go,&Rt_main_task);
/* Waiting for the end */
rt_task_join(&Rt_main_task);
return 0;
}
Regards,
Charles
[-- Attachment #2: Type: text/html, Size: 1350 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Xenomai-help] Detect switch in secondary mode + mlockall = bug?
2011-01-24 9:54 [Xenomai-help] Detect switch in secondary mode + mlockall = bug? Charles Clerdan
@ 2011-01-24 12:26 ` Gilles Chanteperdrix
2011-01-24 12:34 ` Gilles Chanteperdrix
0 siblings, 1 reply; 3+ messages in thread
From: Gilles Chanteperdrix @ 2011-01-24 12:26 UTC (permalink / raw)
To: Charles Clerdan; +Cc: armadeus-forum, xenomai
Charles Clerdan wrote:
> Hi,
>
> I'm trying to catch the signal SIGXCPU, in order to know when a task goes in
> secondary mode.
> I would like to know, why I have to comment the fonction mlockall.
http://www.xenomai.org/index.php/Request_for_information
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [Xenomai-help] Detect switch in secondary mode + mlockall = bug?
2011-01-24 12:26 ` Gilles Chanteperdrix
@ 2011-01-24 12:34 ` Gilles Chanteperdrix
0 siblings, 0 replies; 3+ messages in thread
From: Gilles Chanteperdrix @ 2011-01-24 12:34 UTC (permalink / raw)
To: Charles Clerdan; +Cc: armadeus-forum, xenomai
Gilles Chanteperdrix wrote:
> Charles Clerdan wrote:
>> Hi,
>>
>> I'm trying to catch the signal SIGXCPU, in order to know when a task goes in
>> secondary mode.
>> I would like to know, why I have to comment the fonction mlockall.
>
> http://www.xenomai.org/index.php/Request_for_information
Also, does the latency test run on your platform? Because if it does, it
shows that the bug is elsewhere: latency contains a call to mlockall and
registers a signal handler for SIGXCPU.
And if you want us to help you, you should tell us what happens if you
do not comment mlockall, because we can not guess it. See, we run
latency all the time, and obviously, we have no issue.
--
Gilles.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-24 12:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-24 9:54 [Xenomai-help] Detect switch in secondary mode + mlockall = bug? Charles Clerdan
2011-01-24 12:26 ` Gilles Chanteperdrix
2011-01-24 12:34 ` Gilles Chanteperdrix
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.