On Sat, Mar 7, 2020, 8:30 AM Eshan Dhawan <eshandhawa...@gmail.com> wrote:

> Pthread_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 pthread_getcpuclockid2() function
> but I couldn't find anything related to this in rtems
> so how could we implement pthread_getcpuclockid()?
>

My understanding is that this clock should return the execution time
consumed for the thread. I suspect that returning the thread id for this
cpu clock id will work. In clock_gettime, check for the hard coded clock
IDs, then look this up as a thread id and if it is valid, return the cpu
time used.

You can't set this IMO but check the POSIX standard.


> Thanks
> -Eshan
> _______________________________________________
> devel mailing list
> devel@rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
>
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to