Files
NX2navi/runtime/platform/linux.c
Michael Schienbein 541c4ff84c Start the game again after Restart on every processor it had (Linux).
On Linux each Restart from the menu cost the next game one more processor core on machines with 12 or more logical processors. A process started with posix_spawn begins with the mask of the thread that spawned it, and since the recording thread has a core of its own no thread has every processor: the restarted game began without that core and took the next fast one for its own recording thread. plat_restart (runtime/platform/linux.c) now widens the calling thread's mask to all of the process's processors for the time of the spawn and puts it back. A mask set from outside is kept, helper programs started with plat_spawn are unchanged, and Windows is not touched.

From pull request #435, with its test tests/platform_restart_mask_test.c, which needs Linux. Not compiled or run here: this machine has no Linux compiler.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-10 12:49:10 -05:00

94 KiB