All of lore.kernel.org
 help / color / mirror / Atom feed
* use of posix function clock_gettime
@ 2019-07-08 13:02 Mario Molitor
  2019-07-08 13:34 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Mario Molitor @ 2019-07-08 13:02 UTC (permalink / raw)
  To: xenomai

Hello  Xenomai-Community,

we are seeming to have a migration problem by our internal synchronization kernel-module.

The module try to get timestamp of Host-Real-Time-Clock in Real-Time IRQ context.
In the old version of XENOMAI (2.6.5) it was possible to use XENOMAI POSIX function directly (clock_gettime(CLOCK_HOST_REALTIME,tp)) in the kernel module.

But with XENOMAI version 3.0.7 is this not possible and I haven't found any good workaround in the moment.

We use Xenomai in combination with kernel 4.14.71.

Every hint or suggestion are welcome.

Thanks,
Mario


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: use of posix function clock_gettime
  2019-07-08 13:02 use of posix function clock_gettime Mario Molitor
@ 2019-07-08 13:34 ` Jan Kiszka
  2019-07-10 20:42   ` AW: " mario_molitor
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2019-07-08 13:34 UTC (permalink / raw)
  To: Mario Molitor, xenomai

On 08.07.19 15:02, Mario Molitor via Xenomai wrote:
> Hello  Xenomai-Community,
> 
> we are seeming to have a migration problem by our internal synchronization kernel-module.
> 
> The module try to get timestamp of Host-Real-Time-Clock in Real-Time IRQ context.
> In the old version of XENOMAI (2.6.5) it was possible to use XENOMAI POSIX function directly (clock_gettime(CLOCK_HOST_REALTIME,tp)) in the kernel module.
> 
> But with XENOMAI version 3.0.7 is this not possible and I haven't found any good workaround in the moment.
> 
> We use Xenomai in combination with kernel 4.14.71.
> 
> Every hint or suggestion are welcome.

First of all, all in-kernel APIs have been deprecated and removed in favor of
RTDM driver APIs. However, RTDM does not expose this clock directly. You can
only do rtdm_clock_read (realtime) or rtdm_clock_read_monotonic().

We could add a host_realtime API to RTDM if there is a good use case. And that
would include a reason why the timestamp adjustment (monotonic -> host-realtime)
cannot be done in the userspace application that consumes the driver data.

Also note that CLOCK_HOST_REALTIME is broken for releases prior to
ipipe-core-4.14.132-x86-6.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 3+ messages in thread

* AW: use of posix function clock_gettime
  2019-07-08 13:34 ` Jan Kiszka
@ 2019-07-10 20:42   ` mario_molitor
  0 siblings, 0 replies; 3+ messages in thread
From: mario_molitor @ 2019-07-10 20:42 UTC (permalink / raw)
  To: 'Jan Kiszka', xenomai

> First of all, all in-kernel APIs have been deprecated and removed in favor of RTDM driver APIs. However, RTDM does not expose this clock directly. You can only do rtdm_clock_read (realtime) or rtdm_clock_read_monotonic().

This was also my recognising after reading the code and the information was not really new. Anyway in meantime I have found a workaround/ solution for our problem.

>We could add a host_realtime API to RTDM if there is a good use case. And that would include a reason why the timestamp adjustment (monotonic -> host-realtime) cannot be done in the userspace application that consumes the driver data.

>From my point of view make this always sense if a measurement value needs an accurate Timestamp by the creating. The other applications which could need this are fieldbus application. 
Our measurement system gets her measurement value in the Kernel-Space in a Xenomia-IRQ and in this case was the old Functionality very smart. 
A new Functionality RTDM_ host_realtime would be close this gap and would by also make the RTDM Clock-service completely.

Mario

HBK




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-10 20:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-08 13:02 use of posix function clock_gettime Mario Molitor
2019-07-08 13:34 ` Jan Kiszka
2019-07-10 20:42   ` AW: " mario_molitor

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.