Commit 9e64b43
committed
was: make notification cancellation atomic
Notification callbacks set notify_data.cancel while notify_task reads
it without holding notify_mutex. The plain bool access is therefore a
data race even though updates of notify_active itself are serialized.
Make only the cancel flag C11 atomic. Existing assignments and reads
become sequentially consistent atomic operations, retaining the current
control flow and cancellation behavior while removing undefined
behavior.
Reported-by: GPT-5.6-sol1 parent 6a07344 commit 9e64b43
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments