apps/blehr: shared variable safety
- Dominant language
- C
- Stars
- 893
- Forks
- 512
- Avg merge
- 13d 31m
- Merged PRs (30d)
- 7
Description
https://github.com/apache/mynewt-nimble/blob/7b5b5e5b512133e50ef8a517b13e7269f9c821fd/apps/blehr/src/main.c#L33
Probably not an actual bug, but shouldn't `notify_state` in principle use an `atomic_bool` or another locking mechanism?
It is written in `blehr_gap_event` callback while it is read in the `blehr_tx_hrate` from a timer task.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in apps/blehr/src/main.c around line 33, then trace notify_state access in blehr_gap_event and blehr_tx_hrate. Check the Mynewt execution model for interactions between the callback and timer task, and determine whether the shared access requires synchronization. Done means the safety concern has a justified resolution in the application.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100