<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">How could I compile  a stand-alone C Program on RTEMS and run it ? <br><div dir="ltr"><br><blockquote type="cite">On 08-Mar-2020, at 10:06 AM, Joel Sherrill <joel@rtems.org> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 7, 2020, 10:34 PM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Fri, Mar 6, 2020 at 12:24 PM Eshan Dhawan <<a href="mailto:eshandhawan51@gmail.com" target="_blank" rel="noreferrer">eshandhawan51@gmail.com</a>> wrote:<br>
><br>
> clock_getcpuclockid() is defined in time.h but its implementation in RTEMS returns error<br>
><br>
> I went through FreeBSD and NetBSD implementations of the same<br>
> they call clock_getcpuclockid2() function<br>
> but I couldn't find anything related to this in rtems<br>
> so how could we implement clock_getcpuclockid()?<br>
><br>
<br>
You would either implement it copying from a suitably licensed (2-BSD)<br>
source, or do a clean-room implementation from the specification:<br>
<a href="https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getcpuclockid.html" rel="noreferrer noreferrer" target="_blank">https://pubs.opengroup.org/onlinepubs/9699919799/functions/clock_getcpuclockid.html</a></blockquote></div></div><div dir="auto"><br></div><div dir="auto">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?</div><div dir="auto"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
<br>
> Thanks<br>
> -Eshan<br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank" rel="noreferrer">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
</blockquote></div></div></div>
</div></blockquote></body></html>