bug: reference counter increment/decrement not atomic
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- c
- Domain
- embedded-iot, networking
Research direction
Start by locating the definition and reference-count operations for rtcan_msg_t. Review how messages are accessed concurrently and compare the synchronization approaches described in the issue; done means increments and decrements are thread-safe without breaking message handling or imposing an unacceptable shared-lock cost.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- C
- Stars
- 4
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from sufst/rtcan
-
feature
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
feature
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
feature
-
good first issue low priority refactor
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
feature
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Similar issues
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
HarbourMasters/Shipwright#7229 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
riscv-software-src/riscv-isa-sim#2435 · 1 comment ·
-
bug Self Built Image SNAPSHOT Supported Device target/ramips
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100