RTEMS | Draft: cpukit/rtems: Add taskgetcpuusage.c directive (!1347)

Abdullah Wasiq (@aftwasiq) gitlab at rtems.org
Tue Jul 14 23:09:18 UTC 2026



Abdullah Wasiq created a merge request: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1347

Project:Branches: aftwasiq/rtems:directive-work to rtems/rtos/rtems:main
Author:   Abdullah Wasiq



## Summary

cpukit/rtems: Add taskgetcpuusage.c directive

Adds a new directive following a discussion on instrumenting a numeric CPU usage value which you can read up on [here](https://users.rtems.org/t/hooking-a-function-to-an-idle-task-getting-a-cpu-load-calculation/876)

The directive is based off the helper function getrusage_RUSAGE_THREAD from the POSIX function getrusage(). Instead of being hardcoded to the self_id however, it takes a valid rtems_id and fills a timespec struct instead of a rusage struct.

## Generative AI

None

<!--If you have used AI please use the "AI Contribution" template otherwise leave this blank see our fulls statement at https://www.rtems.org/generative-ai/-->

<!--Default settings, if it is a dropdown it will set after submission-->

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1347
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/4-40515mywaaycbsil5s4o1l6lc-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260714/00d8a854/attachment.htm>


More information about the bugs mailing list