RTEMS | Issue: Add Classic API Barrier 'get number waiting' Service (!442)
mazen Adel (@mez3n)
gitlab at rtems.org
Tue Mar 4 15:15:56 UTC 2025
mazen Adel commented on a discussion on cpukit/rtems/src/barriergetnumwaiting.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120547
> + Barrier_Control *the_barrier;
> + Thread_queue_Context queue_context;
> +
> + if ( waiting == NULL ) {
> + return RTEMS_INVALID_ADDRESS;
> + }
> +
> + the_barrier = _Barrier_Get( id, &queue_context );
> +
> + if ( the_barrier == NULL ) {
> + return RTEMS_INVALID_ID;
> + }
> +
> + _CORE_barrier_Acquire_critical(&the_barrier->Barrier, &queue_context);
> +
> + *waiting=_CORE_barrier_get_num_waiting( &the_barrier->Barrier, &queue_context );
will do
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/442#note_120547
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/20250304/c44a1d33/attachment-0001.htm>
More information about the bugs
mailing list