Implementation of clock_getcpuclockid()
Gedare Bloom
gedare at rtems.org
Sun Mar 8 14:24:27 UTC 2020
On Sat, Mar 7, 2020 at 11:24 PM Eshan Dhawan <eshandhawan51 at gmail.com> wrote:
>
> How could I compile a stand-alone C Program on RTEMS and run it ?
>
I don't know what you mean by "stand-alone" but all the directories
below rtems.git/testsuites contain source code for C programs. There
is also a repository at rtems-examples.git that contains source and
build files that can create several different programs.
> On 08-Mar-2020, at 10:06 AM, Joel Sherrill <joel at rtems.org> wrote:
>
>
>
>
> On Sat, Mar 7, 2020, 10:34 PM Gedare Bloom <gedare at rtems.org> wrote:
>>
>> On Fri, Mar 6, 2020 at 12:24 PM Eshan Dhawan <eshandhawan51 at gmail.com> wrote:
>> >
>> > clock_getcpuclockid() is defined in time.h but its implementation in RTEMS returns error
>> >
>> > I went through FreeBSD and NetBSD implementations of the same
>> > they call clock_getcpuclockid2() function
>> > but I couldn't find anything related to this in rtems
>> > so how could we implement clock_getcpuclockid()?
>> >
>>
>> You would either implement it copying from a suitably licensed (2-BSD)
>> source, or do a clean-room implementation from the specification:
>> https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getcpuclockid.html
>
>
> See my other post. I think it has to be a clean room implementation that is RTEMS specific. How else would you get thread execution time?
>>
>>
>>
>> > Thanks
>> > -Eshan
>> > _______________________________________________
>> > devel mailing list
>> > devel at rtems.org
>> > http://lists.rtems.org/mailman/listinfo/devel
>> _______________________________________________
>> devel mailing list
>> devel at rtems.org
>> http://lists.rtems.org/mailman/listinfo/devel
More information about the devel
mailing list