Commit d11c9c7
committed
Use proper atomics and ref counting
Prefer __atomic_compare_exchange_n over __sync_bool_compare_and_swap.
I chose weak because we are looping and reading the value of old_value constantly anyway, so it would be better to have it weak.
Otherwise, it is equivalent to what it was before.1 parent 7776634 commit d11c9c7
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
14 | | - | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
35 | | - | |
| 36 | + | |
36 | 37 | | |
37 | | - | |
| 38 | + | |
| 39 | + | |
38 | 40 | | |
39 | 41 | | |
40 | 42 | | |
| |||
0 commit comments