hi !

I apllied the patch that you sent me, but there are some weird!
When i run latency program the result is:

r...@vpac270:/home$ /usr/xenomai/bin/latency
== Sampling period: 100 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT|  00:00:02  (periodic user-mode task, 100 us period, priority 99)
RTH|-----lat min|-----lat avg|-----lat max|-overrun|----lat best|---lat
worst
RTD|      83.384|     146.769|     189.538|    1803|      83.384|
189.538


And than the program just freeze, and the kernel trace:

[  780.136217] Xenomai: Switching display-343 to secondary mode after
exception #5 from user-space at 0x93e0 (pid 345)
[  780.169608] Xenomai: registered exported object dispsem-345 (semaphores)
[  783.284333] Xenomai: watchdog triggered -- killing runaway thread
'sampling-343'

I did a software to test, like this :

#include <stdio.h>
#include <sys/mman.h>
#include <native/task.h>
#include <native/timer.h>


void periodic_serialRead (void *arg);


#define TASK_PRIORITY     99     //Priority
#define TASK_MODE    0
#define TASK_STACKSIZE    0

#define TASK_PERIOD    69444 // 69,4us

RT_TASK td;

void periodic_serialRead (void *arg){
    int i1=0;
    unsigned long over1;
    int err1 =
rt_task_set_periodic(NULL,TM_NOW,rt_timer_ns2ticks(TASK_PERIOD));

    for(;;){
        err1 = rt_task_wait_period(&over1);
        if(err1)break;
        printf(" Task Active - Reading -> %d\n",i1++);

    }
}

int main (int argc, char *argv[]){



    int err=0;

    mlockall(MCL_CURRENT|MCL_FUTURE);

    err=rt_task_spawn(&td,
"serialRead",TASK_STACKSIZE,TASK_PRIORITY,TASK_MODE,&periodic_serialRead,NULL);


    if(!err){
        printf("Press any key to finish ... \n ");
        getchar();

        rt_task_delete(&td);

    }

    return 0;
}

if i set a long time interval for my task , for example 500ms it works fine,
but if i put a small value like 70us , the software just freeze.

Can you help ?

Thanks in advance.

On Fri, Aug 28, 2009 at 4:16 PM, Gilles Chanteperdrix <
gilles.chanteperd...@xenomai.org> wrote:

> Felipe Castro wrote:
> > Well , i found the topic, but I'm using kernel 2.6.27 with xenomai 2.4.8
> and
> > the code to be patched is a little bit different. I dont't know how to do
> ,
> > can you help me ?
>
> The code has not changed, but I think my patch was mangled, please try
> the attached one.
>
>
> --
>                                             Gilles.
>
_______________________________________________
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core

Reply via email to