rt_queue_read switch to secondary mode
Hello,
I am new to xenomai and was having a problem with the rt_queue_read call. I am creating a new RT_TASK from my main program with:
rt_task_create(&task, NULL, 0 /* default stack size */, 5 /* priority */, T_FPU | T_JOINABLE);
Once the task has started I switch it to primary mode with:
rt_task_set_mode(0, T_PRIMARY | T_WARNSW, NULL);
Now if I call the rt_queue_read I catch the signal that specifies the system has switched to secondary mode. Is there something fundamentally wrong with what I am doing? I can post a more detailed explanation if required, thanks!
-- Sunny
Quoted 8 lines · Sunny Bhuller
Hello,
I am new to xenomai and was having a problem with thert_queue_readcall. I am creating a newRT_TASKfrom my main program with:
rt_task_create(&task, NULL, 0 /* default stack size */, 5 /* priority */, T_FPU | T_JOINABLE);Once the task has started I switch it to primary mode with:
rt_task_set_mode(0, T_PRIMARY | T_WARNSW, NULL);
Forcing to primary is useless, every real-time task starts in primary mode, regardless of the relevant skin.
Quoted 3 lines
Now if I call the
rt_queue_readI catch the signal that specifies the system has switched to secondary mode. Is there something fundamentally wrong with what I am doing? I can post a more detailed explanation if required, thanks!
There is no reason for rt_queue_read() to move the thread to secondary mode. You should try running the app over GDB, and inspect the backtrace when the signal is received; you might discover that some other code does cause this, or you might discover that we indeed have a bug hiding somewhere. Posting a simple but complete test code that reproduces the issue unambiguously would help too.
Quoted 8 lines
-- Sunny
_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help
Signature · 1 line
Philippe.