RTEMS | Issue: Add Classic API Barrier 'get number waiting' Service (!442)
Gedare Bloom (@gedare)
gitlab at rtems.org
Mon Mar 3 16:22:38 UTC 2025
Merge request https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442 was reviewed by Gedare Bloom
--
Gedare Bloom started a new discussion on cpukit/include/rtems/rtems/barrier.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120474
> rtems_status_code rtems_barrier_release( rtems_id id, uint32_t *released );
>
> +/* Generated from spec:/rtems/barrier/if/get-number-waiting */
Is there a corresponding MR to `rtems-central.git`?
--
Gedare Bloom started a new discussion on cpukit/include/rtems/score/corebarrierimpl.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120475
> + Thread_queue_Context *queue_context
> +)
> +{
The `queue_context` is unused. If we want to keep it in the function call, it should be ignored to avoid unused variable warning, by adding:
`(void) queue_context;`
here.
--
Gedare Bloom started a new discussion on cpukit/rtems/src/barriergetnumwaiting.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120476
> +/*
> + * COPYRIGHT (c) 1989-2007.
> + * On-Line Applications Research Corporation (OAR).
This doesn't look right, unless the code added below was already existing.
--
Gedare Bloom started a new discussion on cpukit/rtems/src/barriergetnumwaiting.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120477
> + _CORE_barrier_Acquire_critical(&the_barrier->Barrier, &queue_context);
> +
> + *waiting=_CORE_barrier_get_num_waiting( &the_barrier->Barrier, &queue_context );
add spaces around ` = `
--
Gedare Bloom started a new discussion on cpukit/include/rtems/score/corebarrierimpl.h: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120478
> + * @return The number of threads currently waiting at the barrier.
> + */
> +static inline uint32_t _CORE_barrier_get_num_waiting(
We generally avoid abbreviations, so `_CORE_barrier_Get_number_waiting()`
Also note the capitalization pattern.
--
Gedare Bloom started a new discussion on cpukit/rtems/src/barriergetnumwaiting.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120479
> + }
> +
> + _CORE_barrier_Acquire_critical(&the_barrier->Barrier, &queue_context);
spaces inside of `( )`.
--
Gedare Bloom started a new discussion on cpukit/rtems/src/barriergetnumwaiting.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120480
> + *waiting=_CORE_barrier_get_num_waiting( &the_barrier->Barrier, &queue_context );
> +
> + _CORE_barrier_Release(&the_barrier->Barrier, &queue_context);
spaces inside of `( )`.
--
Gedare Bloom started a new discussion on spec/build/testsuites/validation/validation-no-clock-0.yml: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120481
> - testsuites/validation/tc-barrier-ident.c
> - testsuites/validation/tc-barrier-release.c
> +- testsuites/validation/tc-barrier-get-number-waiting.c
Although you can put this in the same MR, I would probably make it a separate commit generated from RTEMS Central.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442
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/20250303/6c91335e/attachment-0001.htm>
More information about the bugs
mailing list