Is everything inside a function(task wchi made as a RT_task) is comes under Realtime ?
Hello, I am new here,
I want to know if i make a function(task) to real time,
Is everything inside that function is in realtime scheduler or not ? For Ex.
/*#include <stdio.h>
#include <signal.h>
#include <unistd.h>
#include <sys/mman.h>
#include <native/task.h>
#include <native/timer.h>
#include <rtdk.h>
*/
#include "../../include/Controller/statcom.h"
RT_TASK demo_task;
void demo(void *arg){
RT_TASK *curtask;
RT_TASK_INFO curtaskinfo;
// hello world
rt_printf("Hello World!\n");
printf("Something");
printf("Something");printf("Something");
// inquire current task curtask=rt_task_self(); rt_task_inquire(curtask,&curtaskinfo);
// print task name
rt_printf("Task name : %s \n", curtaskinfo.name);
}
int main(void)
{
char str[10] ;
// Perform auto-init of rt_print buffers if the task doesn't do so rt_print_auto_init(1);
// Lock memory : avoid memory swapping for this program mlockall(MCL_CURRENT|MCL_FUTURE);
rt_printf("start task\n"); /*
* Arguments: &task,
* name, * stack size (0=default), * priority, * mode (FPU, start suspended, ...)
*/
sprintf(str,"hello");
rt_task_create(&demo_task, str, 0, 50, 0);
/*
* Arguments: &task,
* task function,
* function argument
*/
rt_task_start(&demo_task, &demo, 0);
return 0;
}
Here i am trying to print "Something" using "printf" will it's priority will be as high as "rt_printf"
Here task "demo" is in realtime mode.
it's important to know.
Quoted 6 lines · Arun Kumar Gupta
Hello, I am new here,
I want to know if i make a function(task) to real time,
Is everything inside that function is in realtime scheduler or not ? For Ex.
http://www.xenomai.org/documentation/branches/v2.3.x/pdf/Life-with-Adeos-rev-B.pdf
http://www.xenomai.org/documentation/branches/v2.3.x/pdf/Native-API-Tour-rev-C.pdf
Signature · 1 line
Gilles.
Very Good morning.
Sorry for asking silly question.
I read both of the PDF's.
I was thinking that if i am trying to receive a certain level(1 ms) of Response from a controller in a function.
My doubt is that
For Ex.
We have two task sets, Task 2's priority is lesser than task 1. I defined both of the functions Ret_task
Task 1
Rt_task 1.1Rt_task 1.2Rt_task 1.3Linux_Task 1.1
Linux Task 1.2Rt_task 1.4Rt_task .15
Task 2Rt_task 2.1Rt_task 2.2Rt_task 2.3Rt_task 2.4Rt_task .2.5
Let's task 1 start first just after task 2 starts, when task reaches to 'Linux_Task 1.1' , task 2 preeempts to task and starts running and after completing the task 2, Task 1 resumes even task 1's, so task 1's response time became higher due to linux_task in between. Is that right? is this happens? in this case
How should we design Xenomai task where Linux CALLs also included.
Please give some light on this situation.
and please suggest me a video tutorial for creating application using xenomai
When a realtime task in primary mode issues a regular Linux system call, it is
immediately and transparently migrated by Xenomai to the Linux domain, since the operation could not be fulfilled into the Xenomai domain directly. At that
point, the realtime task reenters the Linux kernel at the closest rescheduling
point, and resumes the standard Linux system call procedure.
Quoted 21 lines · Gilles Chanteperdrix
Quoted 6 lines · Arun Kumar Gupta
Hello, I am new here,
I want to know if i make a function(task) to real time,
Is everything inside that function is in realtime scheduler or not ? For Ex.
http://www.xenomai.org/documentation/branches/v2.3.x/pdf/Life-with-Adeos-rev-B.pdf
http://www.xenomai.org/documentation/branches/v2.3.x/pdf/Native-API-Tour-rev-C.pdf
--
Gilles._______________________________________________
Xenomai mailing list
[email protected]
http://www.xenomai.org/mailman/listinfo/xenomai
Signature · 12 lines
Regards Arun Kumar Gupta Find me on <http://facebook.com/arungupta.co.in> <https://twitter.com/arungupta2008> <http://www.linkedin.com/in/arungupta2008> Contact me : +91-8000597109 Blog <http://arungupta.co.in/blog> | Blog @ Blogspo<http://arungupta1.blogspot.in/>t | Myprofile <http://arungupta.co.in/blog/?page_id=2> | My Research<http://arungupta.co.in/blog/?page_id=68> [email protected]
Quoted 1 line · ARUN GUPTA
How should we design Xenomai task where Linux CALLs also included.
That is simple: you should not. Linux calls mean loss of determinism.
Signature · 1 line
Gilles.