xenomai scheduler's ticks period
Quoted 3 lines · Matthieu
I have a segmentation fault error when I use modprobe
xeno_vxworkstick_arg=0 (tick_arg=1000 works)
Any kernel log?
Signature · 1 line
Philippe.
Quoted 8 lines · Philippe Gerum
Quoted 3 lines · Matthieu
I have a segmentation fault error when I use modprobe
xeno_vxworkstick_arg=0 (tick_arg=1000 works)Any kernel log?
wind_sysclk_init uses its argument for a division.
Signature · 1 line
Gilles.
Quoted 11 lines · Gilles Chanteperdrix
Quoted 7 lines · Philippe Gerum
Quoted 3 lines · Matthieu
I have a segmentation fault error when I use modprobe
xeno_vxworkstick_arg=0 (tick_arg=1000 works)Any kernel log?
wind_sysclk_inituses its argument for a division.
skins/vxworks/sysLib.c +2 -2
@@ -39,12 +39,12 @@int wind_sysclk_init (u_long period) {extern u_long sync_time; -u_long init_rate =ONE_BILLION / period; +u_long init_rate = period ?ONE_BILLION / period :XN_APERIODIC_TICK ;int err; err =xntbase_alloc ("vxworks" , period, sync_time ?0 :XNTBISO , &wind_tbase); -if (err) +if (err || period ==0 )return err; err =sysClkRateSet (init_rate);
Signature · 1 line
Philippe.
Quoted 20 lines · Philippe Gerum
Quoted 10 lines · Gilles Chanteperdrix
Quoted 7 lines · Philippe Gerum
Quoted 3 lines · Matthieu
I have a segmentation fault error when I use modprobe
xeno_vxworkstick_arg=0 (tick_arg=1000 works)Any kernel log?
wind_sysclk_inituses its argument for a division.skins/vxworks/sysLib.c +0
-1@@ -39,12 +39,12 @@int wind_sysclk_init (u_long period) {extern u_long sync_time; -u_long init_rate =ONE_BILLION / period;
skins/vxworks/sysLib.c line 50
Quoted 10 lines
skins/vxworks/sysLib.c +2
-1+u_long init_rate = period ?ONE_BILLION / period :XN_APERIODIC_TICK ;int err; err =xntbase_alloc ("vxworks" , period, sync_time ?0 :XNTBISO , &wind_tbase); -if (err) +if (err || period ==0 )return err; err =sysClkRateSet (init_rate);
Ok, but what about sysClkRateGet then ? It is needed for conversion between durations and ticks count. It will not work since sysClkRateSet was not called, and we can not call sysClkRateSet since it would start the timer.
Signature · 1 line
Gilles.
Quoted 28 lines · Gilles Chanteperdrix
Quoted 27 lines · Philippe Gerum
Quoted 10 lines · Gilles Chanteperdrix
Quoted 7 lines · Philippe Gerum
Quoted 3 lines · Matthieu
I have a segmentation fault error when I use modprobe
xeno_vxworkstick_arg=0 (tick_arg=1000 works)Any kernel log?
wind_sysclk_inituses its argument for a division.skins/vxworks/sysLib.c +2
-2@@ -39,12 +39,12 @@int wind_sysclk_init (u_long period) {extern u_long sync_time; -u_long init_rate =ONE_BILLION / period; +u_long init_rate = period ?ONE_BILLION / period :XN_APERIODIC_TICK ;int err; err =xntbase_alloc ("vxworks" , period, sync_time ?0 :XNTBISO , &wind_tbase); -if (err) +if (err || period ==0 )return err;
Quoted 8 lines
skins/vxworks/sysLib.c line 50
Quoted 1 line
skins/vxworks/sysLib.c +0
-0err =sysClkRateSet (init_rate);Ok, but what about sysClkRateGet then ? It is needed for conversion between durations and ticks count. It will not work since sysClkRateSet was not called, and we can not call sysClkRateSet since it would start the timer.
We don't have to care about this. If people want to override the system timer, then they should deal with the xntbase interface themselves. What is provided is a mean to disable internal timing so that it does not conflict with the user-provided stuff, nothing more.
Signature · 1 line
Philippe.
Quoted 45 lines · Philippe Gerum
Quoted 28 lines · Gilles Chanteperdrix
Quoted 27 lines · Philippe Gerum
Quoted 10 lines · Gilles Chanteperdrix
Quoted 7 lines · Philippe Gerum
Quoted 3 lines · Matthieu
I have a segmentation fault error when I use modprobe
xeno_vxworkstick_arg=0 (tick_arg=1000 works)Any kernel log?
wind_sysclk_inituses its argument for a division.skins/vxworks/sysLib.c +2
-2@@ -39,12 +39,12 @@int wind_sysclk_init (u_long period) {extern u_long sync_time; -u_long init_rate =ONE_BILLION / period; +u_long init_rate = period ?ONE_BILLION / period :XN_APERIODIC_TICK ;int err; err =xntbase_alloc ("vxworks" , period, sync_time ?0 :XNTBISO , &wind_tbase); -if (err) +if (err || period ==0 )return err;Quoted 8 lines
skins/vxworks/sysLib.c line 50
Quoted 1 line
skins/vxworks/sysLib.c +0
-0err =sysClkRateSet (init_rate);Ok, but what about sysClkRateGet then ? It is needed for conversion between durations and ticks count. It will not work since sysClkRateSet was not called, and we can not call sysClkRateSet since it would start the timer.
We don't have to care about this. If people want to override the system timer,
then they should deal with the xntbase interface themselves. What is provided is
a mean to disable internal timing so that it does not conflict with the user-provided stuff, nothing more.
Quoted 3 lines
--
Philippe.
Thank you for all, I'll test it tomorrow. I understand that these modifications are sufficient and I will have no problem with "modprobe xeno_vxworks tick_arg=0" command and with tickAnnounce vxworks scheduler in my own rtdm linux module driver. (I'm about using a rtdm driver as Philippe suggest me, directly in a rtdm_irq_handler_t interrupt handler).
Matthieu
Hi
I encounter a problem. I patch my xeno_vxworks module. It seem's working well. But the result doesn't seem to be the one looked for. In fact, I create a vxworks task that enter in a while loop and give me the time spend to the next tick using taskDelay(1). Here is the code of my task :
#include <vxworks/vxworks.h>
#include <native/timer.h>
#include <stdio.h>
#include <sys/mman.h>
long tid;
void tick_value(void *cookie){
RTIME now, previous;
long tick;
previous = rt_timer_read();
while (1) {
now = rt_timer_read();
tick = (long)((now - previous));
printf("Duree du tick : %1ld,%06ld ms\n",tick/1000000,tick%1000000);
previous = now;
taskDelay(1);
}
}void clean_exit(int dummy) {
taskDelete(tid);
}
int main(int argc, char* argv[])
{
mlockall(MCL_CURRENT | MCL_FUTURE);
tid = taskSpawn ( "tick", 100, 0x100, 2000,( FUNCPTR)tick_value, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0);
pause();
fflush(NULL);
return 0;
}When I use modprobe xeno_vxworks tick_arg=3D1000, I have a 1ms tick period, so that's good.
What I expected is that with a tick_arg=3D0, taskDelay(1) suspend my task until an announceTick come. But when I execute my task, taskDelay doesn't wait. I think that the scheduler is always ruuning : I have a minimum tick period around 10 =C2=B5s (limitation due to the changing context from printf I think).
Let me know if I've done something wrong ...
Matthieu