All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai] [NATIVE API] Xenomai native API equivalent for clock_gettime
@ 2018-03-01 12:37 Pintu Kumar
  2018-03-01 17:02 ` Greg Gallagher
  0 siblings, 1 reply; 3+ messages in thread
From: Pintu Kumar @ 2018-03-01 12:37 UTC (permalink / raw)
  To: Xenomai@xenomai.org, Greg Gallagher, Jan Kiszka, Philippe Gerum,
	Jan Kiszka

Hi,

I have one question about Xenomai native API

1) What is the native API equivalent for clock_gettime() ?

I have seen this Xenomai native API guide but I could not find it.
https://xenomai.org/documentation/xenomai-2.6/pdf/native-api.pdf

I have a simple pthread based POSIX application which I converted to native API.
But for calculating the latency difference I using this in both case:
clock_gettime(CLOCK_MONOTONIC, &now);

But I observed that if I use only NATIVE skin, I could not see any
latency difference.
However, if I use POSIX skin I see the latency difference.

So, I want to replace clock_gettime() with native API to find the
exact difference with native skin.

Or, if there is any other better way to measurement latency difference
between POSIX API and native API, please let me know.



Thank You!

Regards,
Pintu


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

* Re: [Xenomai] [NATIVE API] Xenomai native API equivalent for clock_gettime
  2018-03-01 12:37 [Xenomai] [NATIVE API] Xenomai native API equivalent for clock_gettime Pintu Kumar
@ 2018-03-01 17:02 ` Greg Gallagher
  2018-03-08 13:14   ` Pintu Kumar
  0 siblings, 1 reply; 3+ messages in thread
From: Greg Gallagher @ 2018-03-01 17:02 UTC (permalink / raw)
  To: Pintu Kumar; +Cc: Jan Kiszka, Jan Kiszka, Xenomai@xenomai.org

Are you using Xenomai 2.6 or 3?  If you are using 3 use this guide instead:

https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__alchemy__timer.html

Post back if nothing there can help, but you may want to loot at the
source for some of the utilities that calculate latency as a example
to work from

-Greg

On Thu, Mar 1, 2018 at 7:37 AM, Pintu Kumar <pintu.ping@gmail.com> wrote:
> Hi,
>
> I have one question about Xenomai native API
>
> 1) What is the native API equivalent for clock_gettime() ?
>
> I have seen this Xenomai native API guide but I could not find it.
> https://xenomai.org/documentation/xenomai-2.6/pdf/native-api.pdf
>
> I have a simple pthread based POSIX application which I converted to native API.
> But for calculating the latency difference I using this in both case:
> clock_gettime(CLOCK_MONOTONIC, &now);
>
> But I observed that if I use only NATIVE skin, I could not see any
> latency difference.
> However, if I use POSIX skin I see the latency difference.
>
> So, I want to replace clock_gettime() with native API to find the
> exact difference with native skin.
>
> Or, if there is any other better way to measurement latency difference
> between POSIX API and native API, please let me know.
>
>
>
> Thank You!
>
> Regards,
> Pintu


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

* Re: [Xenomai] [NATIVE API] Xenomai native API equivalent for clock_gettime
  2018-03-01 17:02 ` Greg Gallagher
@ 2018-03-08 13:14   ` Pintu Kumar
  0 siblings, 0 replies; 3+ messages in thread
From: Pintu Kumar @ 2018-03-08 13:14 UTC (permalink / raw)
  To: Greg Gallagher; +Cc: Jan Kiszka, Jan Kiszka, Xenomai@xenomai.org

On Thu, Mar 1, 2018 at 10:32 PM, Greg Gallagher <greg@embeddedgreg.com> wrote:
> Are you using Xenomai 2.6 or 3?  If you are using 3 use this guide instead:
>

I am using xenomai-3.0.6

> https://xenomai.org/documentation/xenomai-3/html/xeno3prm/group__alchemy__timer.html
>
> Post back if nothing there can help, but you may want to loot at the
> source for some of the utilities that calculate latency as a example
> to work from
>

OK thank you so much.
I replaced clock_nanosleep() with : rt_task_sleep() and
clock_gettime() with: rt_timer_read().
I think it works fine.
I also replaced: printf() with: rt_printf()

I guess these are the right replaced for xenomai.

But one doubt I still have:
I observed that I instead of using rt_task_sleep() , I can also use
the combination of: rt_task_set_periodic() and rt_task_wait_period().
Both are working as expected.
But I am confused which one is the right one to use? Will there be any
difference in measuring latency ?


> -Greg
>
> On Thu, Mar 1, 2018 at 7:37 AM, Pintu Kumar <pintu.ping@gmail.com> wrote:
>> Hi,
>>
>> I have one question about Xenomai native API
>>
>> 1) What is the native API equivalent for clock_gettime() ?
>>
>> I have seen this Xenomai native API guide but I could not find it.
>> https://xenomai.org/documentation/xenomai-2.6/pdf/native-api.pdf
>>
>> I have a simple pthread based POSIX application which I converted to native API.
>> But for calculating the latency difference I using this in both case:
>> clock_gettime(CLOCK_MONOTONIC, &now);
>>
>> But I observed that if I use only NATIVE skin, I could not see any
>> latency difference.
>> However, if I use POSIX skin I see the latency difference.
>>
>> So, I want to replace clock_gettime() with native API to find the
>> exact difference with native skin.
>>
>> Or, if there is any other better way to measurement latency difference
>> between POSIX API and native API, please let me know.
>>
>>
>>
>> Thank You!
>>
>> Regards,
>> Pintu


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

end of thread, other threads:[~2018-03-08 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 12:37 [Xenomai] [NATIVE API] Xenomai native API equivalent for clock_gettime Pintu Kumar
2018-03-01 17:02 ` Greg Gallagher
2018-03-08 13:14   ` Pintu Kumar

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.