From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <485FDADB.60705@domain.hid> Date: Mon, 23 Jun 2008 19:18:19 +0200 From: Philippe Gerum MIME-Version: 1.0 References: <485F7A69.7080004@domain.hid> <5b5edafe752e2ab744303b0262edc05c@domain.hid> <485FC7F3.7020001@domain.hid> <485FD06A.8060805@domain.hid> <485FD207.9010901@domain.hid> <485FD32C.3040902@domain.hid> In-Reply-To: <485FD32C.3040902@domain.hid> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] xenomai scheduler's ticks period Reply-To: rpm@xenomai.org List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix , xenomai-help Gilles Chanteperdrix wrote: > Philippe Gerum wrote: >> Gilles Chanteperdrix wrote: >>> Philippe Gerum wrote: >>>> Matthieu wrote: >>>> >>>>> I have a segmentation fault error when I use modprobe xeno_vxworks >>>>> tick_arg=0 (tick_arg=1000 works) >>>>> >>>> Any kernel log? >>>> >>> wind_sysclk_init uses its argument for a division. >>> >> --- ksrc/skins/vxworks/sysLib.c (revision 3975) >> +++ ksrc/skins/vxworks/sysLib.c (working copy) >> @@ -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); > > 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. -- Philippe.