RTEMS | CPU Usage api (!864)
Sam Price (@TheSamPrice)
gitlab at rtems.org
Fri Feb 6 13:11:51 UTC 2026
Sam Price started a new discussion on cpukit/libmisc/cpuuse/cpuusagereport.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/864#note_141986
> + if ( the_thread == NULL ) {
> +#if defined(RTEMS_MULTIPROCESSING)
> + if ( _Thread_MP_Is_remote( id ) ) {
> + return RTEMS_ILLEGAL_ON_REMOTE_OBJECT;
> + }
> +#endif
> + return RTEMS_INVALID_ID;
> + }
> +
> + /*
> + * Keep interrupts disabled while sampling uptime and thread usage so the
> + * totals represent a consistent point in time (avoid a tick between reads).
> + */
> + Timestamp_Control total = cpu_usage_total_cpu_time();
> + cpu_usage_populate( the_thread, &total, info );
> + _ISR_lock_ISR_enable( &lock_context );
the isr lock out I wasn't thrilled about.
Also does a lock out occur if
if ( _Thread_MP_Is_remote( id ) ) {
this happens, if so that else case needs an extra isr enable.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/864#note_141986
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/20260206/77ce1d85/attachment.htm>
More information about the bugs
mailing list