Confidence: high · Effort: large (>3 d)
Problem
The whole engine in bruteforce.cu uses Win32 primitives: CRITICAL_SECTION, InterlockedExchange/Add64, _beginthreadex/_stdcall, WaitForSingleObject/CreateEventA, SetThreadAffinityMask, GetTickCount64, QueryPerformanceCounter. None of this is fundamentally Windows-only — C11 <threads.h> + <stdatomic.h> + pthread_setaffinity_np cover all of it. The GUI can stay Windows-only.
Files: src/bruteforce.cu:24, 27, 1609, 1621, 1635-1639, 2564-2587, plus src/bruteforce.c if [resync issue] lands first.
Suggested fix
Step 1 (this issue): introduce
include/os_atomic.h (Interlocked* → atomic_* wrappers)
include/os_thread.h (thread spawn/join, mutex, event, affinity)
include/os_time.h (high-res clock)
with Win32 + POSIX backends behind #ifdef _WIN32. Port the engine code in bruteforce.cu and bruteforce.c to use them. Leave gui.c/main.c Windows-only behind -DBUILD_GUI.
Why it matters
Unlocks a headless Linux build, opens contributions to non-Windows developers, and enables CI to run native Linux tests on free GitHub runners. Pairs with the CMake migration and CLI mode issues.
Confidence: high · Effort: large (>3 d)
Problem
The whole engine in
bruteforce.cuuses Win32 primitives:CRITICAL_SECTION,InterlockedExchange/Add64,_beginthreadex/_stdcall,WaitForSingleObject/CreateEventA,SetThreadAffinityMask,GetTickCount64,QueryPerformanceCounter. None of this is fundamentally Windows-only — C11<threads.h>+<stdatomic.h>+pthread_setaffinity_npcover all of it. The GUI can stay Windows-only.Files:
src/bruteforce.cu:24, 27, 1609, 1621, 1635-1639, 2564-2587, plussrc/bruteforce.cif [resync issue] lands first.Suggested fix
Step 1 (this issue): introduce
include/os_atomic.h(Interlocked* → atomic_* wrappers)include/os_thread.h(thread spawn/join, mutex, event, affinity)include/os_time.h(high-res clock)with Win32 + POSIX backends behind
#ifdef _WIN32. Port the engine code inbruteforce.cuandbruteforce.cto use them. Leavegui.c/main.cWindows-only behind-DBUILD_GUI.Why it matters
Unlocks a headless Linux build, opens contributions to non-Windows developers, and enables CI to run native Linux tests on free GitHub runners. Pairs with the CMake migration and CLI mode issues.