valentin brehier wrote:
 > 
 > bonjour,
 > 
 > (...)
 > 
 > mon probleme porte sur la méthode clock_settime(). J'ai du mal à bien saisir 
 > son comportement et la documentation en ligne n'est pas très précise.
 > 
 > Mon problème est donc le suivant: lorsque j'appel cette méthode, l'horloge 
 > système Xenomai est bien modifié, mais pas l'horloge système Linux. De ce 
 > fait je ne peut pas utiliser hwclock pour mettre à jour l'heure de la RTC. 
 > je dois rester compatible POSIX, il me faut donc une solution pour mettre à 
 > jour la RTC à l'aide du skin POSIX, ce que je n'ai pas trouvé.
 > 
 > Pour information j'utilise une carte ETX qui ne possède pas le support 
 > LAPIC, le timer Xenomai utilise donc la même IRQ (0) que Linux.
 > 
 > dans l'attente de votre réponse, cordialement,

For other readers on this list who do not read french, your problem is
that clock_settime sets Xenomai clock but does not set Linux clock. Then
you talk about setting the RTC.

First, you need to understand that the RTC and Linux system clock are
two different things: the RTC may be used to set Linux system clock
when running hwclock or the NTP daemon. But once it is done, Linux clock
continues its own course.

Xenomai has yet another clock, it is synchronized with Linux clock when
starting Xenomai. This scheme works when Xenomai is compiled as a
module, because loading Xenomai modules usually happens once Linux
system clock is set (using hwclock or ntp) by some boot scripts. But this
scheme does not work when Xenomai is built in Linux kernel, because
Xenomai startup occurs way before Linux clock is set.

So, what I would advise is to write a little tool (actually, I think
this tool could even be part of the tools installed with Xenomai) to
set-up Xenomai clock from Linux clock, this is as simple as running
__real_clock_gettime and clock_settime. You would then run this tool in
a boot script after Linux clock is set by hwclock or ntpd.

Regards.

-- 


                                            Gilles Chanteperdrix.

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to