Jan Kiszka wrote: > Sebastian Smolorz wrote: >> Jan Kiszka wrote: >>> This patch may do the trick: it uses the inverted tsc-to-ns function >>> instead of the frequency-based one. Be warned, it is totally untested >>> inside Xenomai, I just ran it in a user space test program. But it >>> may give an idea. >> >> Your patch needed two minor corrections (ns instead of ts in functions >> xnarch_ns_to_tsc()) in order to compile. A short run (30 minutes) of >> latency -t1 seems to prove your bug-fix: There seems to be no drift. > > That's good to hear. > >> If I got your patch correctly, it doesn't make xnarch_tsc_to_ns more >> precise but introduces a new function xnarch_ns_to_tsc() which is also >> less precise than the generic xnarch_ns_to_tsc(), right? > > Yes. It is now precisely the inverse imprecision, so to say. :) > >> So isn't there still the danger of getting wrong values when calling >> xnarch_tsc_to_ns() not in combination with xnarch_ns_to_tsc()? > > Only if the user decides to implement his own conversion. Xenomai with > all its skins and both in kernel and user space should always run > through the xnarch_* path.
OK, would you commit the patch? -- Sebastian _______________________________________________ Xenomai-core mailing list Xenomaifirstname.lastname@example.org https://mail.gna.org/listinfo/xenomai-core