Commit 6153551
committed
test: Fix port 0 bug in atomic counter initialization
fetch_update returns the previous value, so the first caller got port 0
instead of the random base. Use compare_exchange for one-time init
followed by fetch_add, which correctly returns the base port to the
first caller.
AI tools were used in preparing this commit.1 parent 72f1764 commit 6153551
1 file changed
+8
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
279 | 285 | | |
280 | 286 | | |
281 | 287 | | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 288 | + | |
| 289 | + | |
292 | 290 | | |
293 | 291 | | |
294 | 292 | | |
| |||
0 commit comments