Description
Incrementing and decrementing of the reference count in rtcan_msg_t is not atomic and therefore not thread safe.
Expected Behaviour
Reference count implemented in thread-safe manner.
Additional Notes
- Could use a semaphore for each RTCAN message, though there is a large memory cost there.
- Could also have a "reference count mutex" which locks ALL reference counts, this is less costly in terms of memory but could slow things down.
Description
Incrementing and decrementing of the reference count in
rtcan_msg_tis not atomic and therefore not thread safe.Expected Behaviour
Reference count implemented in thread-safe manner.
Additional Notes