All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] Is everything inside a function(task wchi made as a RT_task) is comes under Realtime ?
@ 2014-05-02 13:36 Arun Kumar Gupta
  2014-05-02 17:40 ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: Arun Kumar Gupta @ 2014-05-02 13:36 UTC (permalink / raw)
  To: xenomai

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai] Is everything inside a function(task wchi made as a RT_task) is comes under Realtime ?
  2014-05-02 13:36 [Xenomai] Is everything inside a function(task wchi made as a RT_task) is comes under Realtime ? Arun Kumar Gupta
@ 2014-05-02 17:40 ` Gilles Chanteperdrix
  2014-05-04  2:15   ` ARUN GUPTA
  0 siblings, 1 reply; 4+ messages in thread
From: Gilles Chanteperdrix @ 2014-05-02 17:40 UTC (permalink / raw)
  To: xenomai

Le 02/05/2014 15:36, Arun Kumar Gupta a écrit :
> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai] Is everything inside a function(task wchi made as a RT_task) is comes under Realtime ?
  2014-05-02 17:40 ` Gilles Chanteperdrix
@ 2014-05-04  2:15   ` ARUN GUPTA
  2014-05-04 17:39     ` Gilles Chanteperdrix
  0 siblings, 1 reply; 4+ messages in thread
From: ARUN GUPTA @ 2014-05-04  2:15 UTC (permalink / raw)
  To: Gilles Chanteperdrix, xenomai

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.1
Rt_task 1.2
Rt_task 1.3
Linux_Task 1.1
Linux Task 1.2
Rt_task 1.4
Rt_task .15


Task 2
Rt_task 2.1
Rt_task 2.2
Rt_task 2.3
Rt_task 2.4
Rt_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 real­time 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 real­time task re­enters the Linux kernel at the closest
rescheduling
point, and resumes the standard Linux system call procedure.



On Fri, May 2, 2014 at 11:10 PM, Gilles Chanteperdrix <
gilles.chanteperdrix@xenomai.org> wrote:

> Le 02/05/2014 15:36, Arun Kumar Gupta a écrit :
> > 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
> Xenomai@xenomai.org
> http://www.xenomai.org/mailman/listinfo/xenomai
>



-- 
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>
mail@arungupta.co.in

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Xenomai] Is everything inside a function(task wchi made as a RT_task) is comes under Realtime ?
  2014-05-04  2:15   ` ARUN GUPTA
@ 2014-05-04 17:39     ` Gilles Chanteperdrix
  0 siblings, 0 replies; 4+ messages in thread
From: Gilles Chanteperdrix @ 2014-05-04 17:39 UTC (permalink / raw)
  To: ARUN GUPTA, xenomai

On 05/04/2014 04:15 AM, ARUN GUPTA wrote:
> How should we design Xenomai task where Linux CALLs also included.

That is simple: you should not. Linux calls mean loss of determinism.


-- 
                                                                Gilles.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-05-04 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-02 13:36 [Xenomai] Is everything inside a function(task wchi made as a RT_task) is comes under Realtime ? Arun Kumar Gupta
2014-05-02 17:40 ` Gilles Chanteperdrix
2014-05-04  2:15   ` ARUN GUPTA
2014-05-04 17:39     ` 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.