Sebastian Huber started a new discussion on cpukit/posix/src/semclockwait.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/669#note_130759

 > +  Thread_Control       *executing;
 > +  unsigned int          count;
 > +
 > +  POSIX_SEMAPHORE_VALIDATE_OBJECT( _sem );
 > +
 > +  sem = _Sem_Get( &_sem->_Semaphore );
 > +  _Thread_queue_Context_initialize( &queue_context );
 > +  _Thread_queue_Context_ISR_disable( &queue_context, level );
 > +  executing = _Sem_Queue_acquire_critical( sem, &queue_context );
 > +
 > +  count = sem->count;
 > +  if ( RTEMS_PREDICT_TRUE( count > 0 ) ) {
 > +    sem->count = count - 1;
 > +    _Sem_Queue_release( sem, level, &queue_context );
 > +    return 0;
 > +  } else {

Since you return in the `if`, you don't need this `else`.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/669#note_130759
You're receiving this email because of your account on gitlab.rtems.org.


_______________________________________________
bugs mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/bugs

Reply via email to