RTEMS | Add CPU Usage calls to return the time or ticks accounted for in tasks (#5060)
Chris Johns (@chris)
gitlab at rtems.org
Fri Jul 5 05:47:17 UTC 2024
Chris Johns commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5060#note_108692
The man page on FreeBSD says:
> This interface is obsoleted by getrusage(2) and gettimeofday(2).
The issue with `getrusage()` is:
```c
/*
* RTEMS only has a single process so there are no children.
* The single process has been running since the system
* was booted and since there is no distinction between system
* and user time, we will just report the uptime.
*/
```
And EPICS wants the amount of time tasks have used which is this time less `IDLE`. I am now wondering is `IDLE` time should be account for as system time and that would leave user time as the time spent running tasks?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/issues/5060#note_108692
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240705/370f7dfd/attachment.htm>
More information about the bugs
mailing list