Gedare Bloom started a new discussion on testsuites/sptests/spcan02/init.c: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1113#note_145078

 > +    RTEMS_DEFAULT_ATTRIBUTES,
 > +    &can1_tx_id
 > +  );
 > +  rtems_test_assert( rv == RTEMS_SUCCESSFUL );
 > +
 > +  rv = rtems_task_start( can1_tx_id, can_sender, (rtems_task_argument) can1 
 > );
 > +  rtems_test_assert( rv == RTEMS_SUCCESSFUL );
 > +
 > +  while (
 > +    ( atomic_load( &can1->active_tasks ) > 0 ||
 > +      atomic_load( &can2->active_tasks ) > 0 ) &&
 > +    timeout_ms > 0
 > +  ) {
 > +    rtems_task_wake_after( RTEMS_MILLISECONDS_TO_TICKS( 10 ) );
 > +    timeout_ms -= 10;
 > +  }

I would just use a barrier or similar synchronization primitive rather than 
hand-crafting one with atomic operations.

-- 
View it on GitLab: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1113#note_145078
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