mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 15:59:59 -04:00
nvnQueueSubmitCommands' q->submits++, vk_backend.c synced_held_count's two counts and vk_exec.c vk_exec_gate_wait's window (GW) run on the calling guest thread without a lock, and the game submits and waits from several threads (five in the 0.10.0 fresh session). A plain ++ there loses counts, and two threads could both reach a window's end and log it, or reset it under each other. Now each count is an atomic add; the line is logged by the thread whose add reached it, and the gate's window is taken with exchanges by the thread whose add made it 600, so adds that come in meanwhile count in that window or the next. Nothing reads q->submits today; the counts only feed log lines. Not reproduced before the change. Checks that passed: pass_cc_check of vk_exec.c, vk_backend.c and nvn_api_core.c with no new -Wall -Wextra warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
42 KiB
42 KiB