RTEMS | Draft: cpukit: add support for common CAN/CAN FD stack (!49)

Pavel Pisa (@ppisa) gitlab at rtems.org
Fri Jun 28 13:09:14 UTC 2024




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_108469

 > + */
 > +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 ) {

There has been helper functions but together but we have found them unusable with TAILQ. But may it be other abstraction could work. Another rule for the code is not to keep anything locked when code returns from function. I hope it has been kept...

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/49#note_108469
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/20240628/6223e772/attachment.htm>


More information about the bugs mailing list