[RTEMS Project] #3891: Implement pthread_getcpuclockid()

RTEMS trac trac at rtems.org
Fri Apr 3 17:43:47 UTC 2020


#3891: Implement pthread_getcpuclockid()
------------------------------+-------------------------
 Reporter:  Joel Sherrill     |       Owner:  (none)
     Type:  enhancement       |      Status:  new
 Priority:  normal            |   Milestone:  Indefinite
Component:  posix             |     Version:
 Severity:  normal            |  Resolution:
 Keywords:  POSIX-Compliance  |  Blocked By:
 Blocking:                    |
------------------------------+-------------------------
Description changed by Joel Sherrill:

Old description:

> The pthread_getcpuclockid() method currently returns ENOSYS. It should be
> implemented. Since each thread has execution time statistics with it,
> this should just be a matter of figuring out how the clock id is
> specified for each thread.
>
> https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_getcpuclockid.html
>
> The thread ID can be reused as the per thread cpu clock ID because it is
> distinct from any defined clock id.
>
> Beyond adding the one method, the methods clock_gettime and clock_settime
> must also be modified to support this clock type.

New description:

 The pthread_getcpuclockid() method currently returns ENOSYS. It should be
 implemented. Since each thread has execution time statistics with it, this
 should just be a matter of figuring out how the clock id is specified for
 each thread.

 https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_getcpuclockid.html

 The thread ID can be reused as the per thread cpu clock ID because it is
 distinct from any defined clock id.

 Beyond adding the one method, the methods clock_gettime and clock_settime
 must also be modified to support this clock type. There may be other cases
 where per thread cpu clock id is used. A search for this capability in the
 POSIX standard will have to be done to ensure all use cases are covered.

 This also will require writing test code and updating the POSIX Compliance
 Guide via the tracking spreadsheet.

--

--
Ticket URL: <http://devel.rtems.org/ticket/3891#comment:2>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list