Pavel Pisa commented on a discussion on cpukit/include/dev/can/can-queue.h: 
https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108470

 > + */
 > +static inline void canque_edge_incref( struct canque_edge_t *edge )
 > +{
 > +  atomic_fetch_add( &edge->edge_used, 1 );
 > +}
 > +
 > +/* Non-inlined version of edge reference decrement */
 > +void __canque_edge_decref( struct canque_edge_t *edge );
 > +
 > +static inline void __canque_edge_decref_body( struct canque_edge_t *edge )
 > +{
 > +  int dead_fl = 0;
 > +  struct canque_ends_t *inends=edge->inends;
 > +  struct canque_ends_t *outends=edge->outends;
 > +
 > +  if ( inends < outends ) {

I have found original 
[canque_edge_lock_both_ends](https://sourceforge.net/p/ortcan/lincan/ci/master/tree/lincan/include/can_queue.h#l582)
 and 
[canque_edge_unlock_both_ends](https://sourceforge.net/p/ortcan/lincan/ci/master/tree/lincan/include/can_queue.h#l596).
 But the code has complicated, RTEMS has only one IRQ safe spilnlock and then 
flags has been required twice, stack order and TALQ requirements resulted in 
complex code and each copy is little different.

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