Windows dependency catalog for the Linux port (research)

Abierto
#507 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
cmake, cpp, linux

Línea de trabajo

Start with runtime/include/nxrt/os.h and compare the Windows implementations and call sites named in the catalog, especially runtime/src/mem/memory.cpp, runtime/src/mem/write_watch.cpp, and runtime/src/kernel/sched.cpp. Trace each required OS behavior and its Linux constraints from the cited paths and line numbers. Done means the research catalog supports the design of a Linux OS abstraction; the issue provides no implementation or acceptance criteria.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

in progress tracking

Catalog of the runtime's Windows dependencies (research)

Base commit: d6b809aa86a9b600f09fa14145c6751ef81b4f23 (origin/main, Dittobyte/pokopia).
Read-only catalog for the design of runtime/include/nxrt/os.h (os_win32.cpp / os_posix.cpp). All paths relative to runtime/.

Counts checked against this tree: all are in the same ballpark and are extended below with file:line.
The runtime is clang-cl/MSVC on Windows; CMakeLists.txt:17 hard-fails on NOT WIN32. add_compile_definitions sets
NOMINMAX WIN32_LEAN_AND_MEAN _CRT_SECURE_NO_WARNINGS _WIN32_WINNT=0x0A00; CMAKE_MSVC_RUNTIME_LIBRARY is /MT (static CRT).

Already portable (do not re-catalog): window/input/Vulkan surface via SDL3 (include/nxrt/platform.h, src/gfx/platform.cpp);
the lifted game code (no Win32 in recomp/; only game-build/src/pkp_main.cpp); the coop module (third_party/pokopia-coop,
portable C11, coop_plat.c already has #ifdef _WIN32 / POSIX branches); the ELF loader (src/loader/module.cpp includes no
windows.h — it goes through mem::reserve_fixed/mem::commit/mem::protect); the guest bsd socket table (src/net/vsock.cpp,
pure C++ over vnet::Link); the spatial upscalers FSR 1 and NIS (src/gfx/extras/fsr1_*.cpp, nis_spatial.cpp, shader-based).


1. Files that include windows.h (79), by folder

apps/launcher (5): game_info.h, keymap_win.h, main.cpp, page_keys.cpp, ui.h
games/pkp (1): pkp_kbm.cpp
src/core (3): abi_glue.cpp, dispatch.cpp, nxmodule.cpp
src/diag (11): crash.cpp, ftrace.cpp, gauge.cpp, host_probe.cpp, log.cpp, memguard.cpp, registry.cpp,
sampler.cpp, stackwalk.h, symbols.cpp, watchdog.cpp
src/eh (1): unwind.cpp
src/gfx (2): frame_limiter.cpp, scene_runner.cpp
src/gfx/extras (3): temporal_dlss.cpp, temporal_ffx.cpp, win_display.cpp
src/gfx/nvn (9): nvn_gpl.cpp, nvn_gpu.cpp, nvn_gpu_pool.cpp, nvn_pipeline.cpp, nvn_pool_copy.cpp,
nvn_shaders.cpp, nvn_tex_edit.cpp, nvn_texprep.cpp, nvn_texup.cpp
src/gfx/play (4): play.cpp, play_selftest.cpp, play_ui_about.cpp, prompts.cpp
src/host_device.cpp (1)
src/kernel (13): busy_mutex.cpp, handles.cpp, kernel_internal.h, kernel_sync.cpp, precise_wait.cpp, sched.cpp,
starvation_guard.cpp, svc.cpp, svc_info.cpp, svc_memory.cpp, svc_thread.cpp, thread.cpp, time.cpp
src/media (1): movie_mf.cpp
src/mem (2): memory.cpp, write_watch.cpp
src/net (2): lobby.cpp, relay_server.cpp
src/os (1): sync.cpp
src/services (13): acc.cpp, album.cpp, audio_devices.cpp, audio_xaudio2.cpp, audren/Integration/ThreadBoost.h,
common.cpp, fs_romfs.cpp, fs_volume.cpp, logfault.cpp, misc.cpp, pl.cpp, time.cpp, timezone.cpp
src/testtools (3): tt_core.cpp, tt_game.cpp, tt_runner.cpp
src/timestep (1): timestep.cpp
third_party (3): third_party/amd_ffx_api/api/include/ffx_api_loader.h,
third_party/nvidia_streamline/include/sl_security.h, third_party/pokopia-coop/coop_int.h

Other Windows headers (beyond windows.h)
  • <intrin.h>: none directly; intrinsics are used bare (__rdtsc, _mm_pause, _umul128, __cpuid).
  • <dbghelp.h>: src/diag/symbols.cpp (UnDecorateSymbolName, IMAGE_NT_HEADERS).
  • <mmsystem.h>: src/services/audren/Integration/ThreadBoost.h (timeBeginPeriod/timeEndPeriod).
  • <winsock2.h>: src/net/{relay_server,tcp,udp}.cpp, third_party/pokopia-coop/coop_plat.c/coop_disc.c; <ws2tcpip.h>/<iphlpapi.h> via relay_server.cpp.
  • <objbase.h>/<combaseapi.h>: audio_devices.cpp, audio_xaudio2.cpp, album.cpp, movie_mf.cpp.
  • <mmdeviceapi.h>/<audioclient.h>/<mmreg.h>: audio_devices.cpp (IMMDeviceEnumerator), audio_xaudio2.cpp (xaudio2.h, mmreg.h).
  • <xaudio2.h>: audio_xaudio2.cpp.
  • <mfapi.h>/<mfidl.h>/<mfreadwrite.h>/<shlwapi.h>: movie_mf.cpp (Media Foundation).
  • <dxgi.h>: win_display.cpp, temporal_dlss.cpp.
  • <shellapi.h>: host_device.cpp (ShellExecute for Steam keyboard).
  • <winreg.h> (via windows.h): host_device.cpp, acc.cpp (RegGetValueA).
  • <psapi.h>: linked in CMakeLists.txt (psapi), used by gauge.cpp, memguard.cpp (GetProcessMemoryInfo, GetProcessHandleCount, GetGuiResources).

2. Per API family: call sites and what the code relies on

Memory (reserve/commit/protect, mapped views)

Core contract: include/nxrt/memory.h. Guest pointers are host pointers (identity map). Layout constants:
kMainBase 0x7100000000, kRemoteBase 0x7200000000, kHleBase 0x7400000000, kSdkBase 0x7500000000,
kHeapBase 0x7800000000 (kHeapMax 0x300000000 = 12 GiB), kAliasBase 0x6000000000 (+8 GiB),
kStackBase 0x7C00000000, kKernelBase 0x7E00000000 (+4 GiB each). kPage 0x1000, kAllocGranularity 0x10000 (64 KiB),
kAddrLimit 0x800000000000 (47-bit user limit).

Call sites and semantics:

  • mem/memory.cpp:277 reserve_fixed: VirtualAlloc(addr, size, MEM_RESERVE, PAGE_NOACCESS) at an exact address; the code
    treats a non-addr result as an error (:285). Requires 64 KiB alignment. → os.h: reserve at fixed address, refuse if not exact.
  • mem/memory.cpp:319 commit: VirtualAlloc(start, end-start, MEM_COMMIT, protect). Reserve vs commit are separate.
  • mem/memory.cpp:334 decommit: VirtualFree(start, end-start, MEM_DECOMMIT).
  • mem/memory.cpp:347-390 protect: page-granularity VirtualProtect, two passes (first VirtualQuery to verify every page is
    MEM_COMMIT, then per-region VirtualProtect) so a failure never leaves the range half-changed. Maps Prot{None,R,RW,RX,RWX}
    → PAGE_NOACCESS/PAGE_READONLY/PAGE_READWRITE/PAGE_EXECUTE_READ/PAGE_EXECUTE_READWRITE (:43-52).
  • mem/memory.cpp:418-438 is_mapped: VirtualQuery walk; committed and not PAGE_NOACCESS/PAGE_GUARD.
  • mem/memory.cpp:443-510 heap_create: the heap is a pagefile-backed section — CreateFileMappingW(INVALID_HANDLE_VALUE, PAGE_READWRITE|SEC_RESERVE) with a primary view MapViewOfFileEx(..., kHeapBase) plus alias views of the same section pages
    (heap_alias :616-677, MapViewOfFileEx at fixed/auto addresses) so one physical page is seen at two guest addresses. SEC_RESERVE
    so nothing is charged until committed. Under Wine it falls back to plain VirtualAlloc private memory (:459-478; heap_section
    auto): Wine sections are shared-file backed and Linux GPU userptr imports are anonymous-only, so no alias/private views exist there.
  • mem/memory.cpp:564-604 heap_decommit: VirtualFree(MEM_DECOMMIT) is refused on section-view pages (ERROR_INVALID_PARAMETER),
    so decommit is emulated with VirtualProtect PAGE_NOACCESS through the primary view (:574-576).
  • mem/memory.cpp:682 heap_private_view: MapViewOfFile at an OS-chosen address (small view for GPU pool import; importing 64 KB of the
    multi-GiB primary view cost tens of ms).
  • kernel/svc_memory.cpp:144-156 alias_alloc: a page-aligned address is served by reserving the enclosing 64 KiB range and committing
    the pages (MapSharedMemory/MapTransferMemory). :638-716 MapPhysicalMemory: one reservation per 64 KiB granule with a 16-bit page
    mask; pages committed/decommitted individually (fresh pages read zero), granule released when last page goes.
  • kernel/svc_memory.cpp:227 SetHeapSize commits the whole heap (Pokopia ~10.4 GiB at boot); ERROR_COMMITMENT_LIMIT handled
    specially (out_of_commit :180-195, MessageBoxA + TerminateProcess(6)).

What matters for the design: reserve vs commit vs decommit; exact-address reservation (MAP_FIXED_NOREPLACE); 4 KiB pages vs 64 KiB
allocation granularity (views/reservations must be 64 KiB aligned); PAGE_GUARD/PAGE_NOACCESS distinct from "not committed"; mirrored
views (memfd/mmap MAP_SHARED of one fd, or userfaultfd); fresh-committed pages read as zero; VirtualQuery-equivalent (walk
/proc/self/maps or keep a side table — the code already keeps a side g_heap_cls table to avoid the walk).

Faults / exceptions (VEH, __try, guard pages)
  • mem/write_watch.cpp:385 registers AddVectoredExceptionHandler(1, on_fault) — priority 1, so it runs before the crash handler.
    on_fault (:269-315) reads ExceptionInformation[0] (0 read/1 write/8 execute) and [1] (address); returns
    EXCEPTION_CONTINUE_EXECUTION to retry the faulting write (:284,296,314) or EXCEPTION_CONTINUE_SEARCH. Page write-tracking by
    page protection (PAGE_READONLY arm / PAGE_NOACCESS guard), four bitmaps + wsum; the handler and before_os_write use only atomics +
    VirtualProtect + a slim SRW lock.
  • mem/write_watch.cpp:269-315 — the fault handler must be fast and re-entrant from any thread; it also distinguishes "our"
    read-only page (release and continue) from a foreign one (continue search). release_page (:169-212) carefully orders the
    releasing[] counter, the prot bit and the VirtualProtect so a zero count means "no releaser in flight".
  • diag/crash.cpp:320 AddVectoredExceptionHandler(0, crash_vectored) (stack overflow) + :317 SetUnhandledExceptionFilter (crash_filter); :319 SetThreadStackGuarantee(64 KiB); TerminateProcess for hard exit (:264,278,285). Guest traps are ordinary
    exception codes 0xE0000001/2/3 (abi_glue.cpp:60, dispatch.cpp:294, svc_thread.cpp:335).
  • diag/crash.cpp:80-98 readable() reads PAGE_GUARD|PAGE_NOACCESS|PAGE_READONLY|... to check without faulting.
  • __try/__except (SEH) sites: gfx/nvn/nvn_pool_copy.cpp:152, nvn_tex_edit.cpp:75,83, nvn_texprep.cpp:86,96,102,
    testtools/tt_game.cpp:40,179 — all are "memcpy/read that survives an access violation on a guest page decommitted under it";
    GetExceptionCode()/EXCEPTION_EXECUTE_HANDLER.

What matters: two VEH handlers with a fixed relative order (write-watch before crash); EXCEPTION_CONTINUE_EXECUTION (→
sigaction + longjmp-style return-to-faulting-insn, or ucontext_t PC/RIP is already past the insn — needs care); __try/__except
is a hard MSVC-only construct (→ sigsetjmp/siglongjmp + sigaction per-thread, or refactor to process_vm_readv/manual checks);
stack overflow caught on a fresh helper thread with a guaranteed stack region (sigaltstack).

Threads / priority / affinity
  • kernel/thread.cpp:147 CreateThread(..., CREATE_SUSPENDED | STACK_SIZE_PARAM_IS_A_RESERVATION) then ResumeThread (:157);
    :185 DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), ...) to adopt the host main thread.
  • kernel/thread.cpp:185,187,61 GetCurrentThreadId as the thread key; diag/registry.cpp:28-32 DuplicateHandle +
    GetCurrentThreadId for the thread registry (crash/sampler/watchdog walk it).
  • kernel/sched.cpp (whole file): console core model — GetLogicalProcessorInformationEx(RelationProcessorCore) for core topology and
    EfficiencyClass (:41-61); GetProcessAffinityMask (:162); SetThreadAffinityMask + SetThreadIdealProcessorEx +
    SetThreadPriorityBoost(TRUE) (dynamic boost off) + SetThreadPriority (sched_apply :310-336). HOS priority (28..63) maps to six
    Windows bands: THREAD_PRIORITY_TIME_CRITICAL/HIGHEST/ABOVE_NORMAL/NORMAL/BELOW_NORMAL/LOWEST (sched_host_priority :230-245).
  • sched.cpp:265 SetProcessInformation(ProcessPowerThrottling) (EcoQoS opt-out, Win11); sched.cpp:282 SetPriorityClass.
  • sched.cpp:302 GetCurrentProcessorNumberEx for the thread's real core; svc.cpp:192 GetCurrentProcessorNumber.
  • kernel/starvation_guard.cpp:113 GetThreadIdealProcessorEx, :162,239 SetThreadPriority, :236 SetThreadAffinityMask.
  • Other SetThreadPriority sites: nvn_gpl.cpp:359,650, nvn_shaders.cpp:1132, nvn_tex_edit.cpp:166, nvn_texprep.cpp:252-256,
    nvn_texup.cpp:64, scene_runner.cpp:100,152, audren/Integration/ThreadBoost.h:25,35,40.
  • CreateMutexA named (Local\...) for cross-process core-slot arbitration (sched.cpp:93,117).
  • kernel/starvation_guard.cpp:163 NtQuerySystemInformation via GetProcAddress(ntdll) for cross-process CPU times.
  • sched.cpp:289 SwitchToThread (yield); svc_thread.cpp:179 Sleep(0).

What matters: one OS thread per guest thread; per-thread affinity to one host CPU (strict) or a pool + ideal processor (soft);
priority in 6 discrete bands with dynamic boost disabled; a stable "which core am I on" (sched_getcpu on Linux); the ability to
SetThreadPriorityBoost (→ no direct equivalent; priorities map to nice/SCHED_*). Named process-global mutexes → flock/POSIX named
semaphore or an abstract Unix socket lock.

Locks / condition variables / waits
  • os/sync.cpp (whole file) is the guest-address keyed mutex/cond/event/semaphore implementation built on SRWLOCK +
    CONDITION_VARIABLE
    (SleepConditionVariableSRW, WakeConditionVariable, WakeAllConditionVariable). Uses InitializeSRWLock/
    InitializeConditionVariable (:100-107) and relies on zero-initialised static SRWLOCK being a valid unlocked lock
    (:110, kernel/handles.cpp:13, kernel/kernel_sync.cpp:27, thread.cpp:26, write_watch.cpp:51). Exclusive and shared acquisition
    (AcquireSRWLockExclusive/Shared); non-recursive.
  • kernel/kernel_sync.cpp: one SRWLOCK g_k kernel lock + a CONDITION_VARIABLE per thread (kernel_internal.h:10-15,
    sizeof(CONDITION_VARIABLE)==sizeof(void*) asserted); SleepConditionVariableSRW(..., ms, 0) with a 10 ms slice for the blocked hook
    (:97); CreateEventW/SetEvent/ResetEvent for the precise-wake path (:109-133).
  • mem/write_watch.cpp:51-64: slim SRW reader/writer lock (AcquireSRWLockShared for readers, Exclusive for arm/destroy).
  • thread.cpp:213 WaitForSingleObject(thread_handle, timeout_ms) for join; thread.cpp:260 wait for exit.
  • kernel/handles.cpp handle table guarded by one SRWLOCK (shared read / exclusive write).
  • Windows WaitForSingleObject/WaitForMultipleObjects/SignalObjectAndWait are not used for guest waits (those are re-implemented in
    os/sync.cpp); the Win32 wait objects used directly are: thread handles, the waitable timer, CreateEvent for precise wake, and
    CreateMutexA for core slots.

What matters: SRWLOCK exclusive/shared non-recursive; CONDITION_VARIABLE paired with SRW; SleepConditionVariableSRW with timeout;
FIFO wakeup ordering (the code builds its own FIFO of waiter nodes on top, so plain std::condition_variable suffices); zero-init valid
lock → std::mutex/std::condition_variable (which also zero-init fine). The plan already calls for moving these to std::mutex/
std::condition_variable (and C++20 atomic_wait for futex waits). No WaitOnAddress in src (0 hits).

Time / sleep / timers
  • QueryPerformanceCounter/QueryPerformanceFrequency: diag/ftrace.cpp:105,58, diag/gauge.cpp:42,46, diag/log.cpp:98-117,
    kernel/time.cpp:24-33,94-99,127-129, kernel/precise_wait.cpp:41-50, gfx/frame_limiter.cpp:275-279, timestep/timestep.cpp:125-129,
    testtools/tt_core.cpp (multiple). Semantics: monotonic; system_tick() splits (v/freq)*hz + (v%freq)*hz/freq to avoid overflow
    (time.cpp:33); qpc_ns() splits similarly (precise_wait.cpp:49). frame_limiter.h:63 now_ns() = "QPC in nanoseconds".
  • High-resolution waitable timer: kernel/time.cpp:68 and kernel/precise_wait.cpp:58 CreateWaitableTimerExW(nullptr, nullptr, CREATE_WAITABLE_TIMER_HIGH_RESOLUTION, TIMER_ALL_ACCESS); SetWaitableTimer with a negative LARGE_INTEGER (relative, 100 ns
    units) and WaitForSingleObject(timer, INFINITE) (time.cpp:73-76, precise_wait.cpp:130-142, frame_limiter.cpp:80).
    precise_wait.cpp:54-71 falls back to a plain waitable timer, then to Sleep (ms).
  • NtDelayExecution (ntdll, via GetProcAddress): kernel/time.cpp:55,88 for short sleeps (≤200 µs) — under Wine it is a host nanosleep
    good to tens of µs; Windows rounds up to the timer grid. [kernel] short_sleep chooses yield vs sleep.
  • Sleep/Sleep(0)/Sleep(1) fallbacks and coarse waits: time.cpp:74, frame_limiter.cpp:100, busy_mutex.cpp:42,
    write_watch.cpp:209-210, fs_volume.cpp:237,701, nvn_shaders.cpp:1135, play.cpp:436,463, svc_memory.cpp:194,
    timestep/timestep.cpp:208, diag/crash.cpp:265, diag/ftrace.cpp:114,243,258.
  • GetTickCount64: starvation_guard.cpp:244, write_watch.cpp:225, tt_runner.cpp (multiple).
  • GetSystemTimePreciseAsFileTime: services/time.cpp:10 (host UTC), tt_core.cpp:592.
  • GetDynamicTimeZoneInformation/GetTimeZoneInformationForYear/SYSTEMTIME/TIME_ZONE_INFORMATION: services/timezone.cpp:344-367
    (builds a DST rule for years 1970..2037); GetSystemTime-family + std::chrono::system_clock in services/time.cpp:177-191.
  • GetProcessTimes/GetThreadTimes: gauge.cpp:322, svc_info.cpp:65, watchdog.cpp:85.
  • timeBeginPeriod(1)/timeEndPeriod(1): audren/Integration/ThreadBoost.h:57,62.

What matters: a monotonic high-frequency clock (clock_gettime(CLOCK_MONOTONIC_RAW)), a 100 ns-unit absolute/relative timer with
sub-ms resolution (timerfd/clock_nanosleep), short-sleep precision (µs; Linux timer slack vs SCHED_FIFO), GetTickCount64
(monotonic ms), wall clock + DST rules (→ localtime/tzdata or tzset//etc/localtime), process/thread CPU times
(clock_gettime(CLOCK_PROCESS_CPUTIME_ID)/CLOCK_THREAD_CPUTIME_ID).

Files / mapping / ini / registry
  • services/fs_volume.cpp: full file layer — CreateFileW (:175,702), ReadFile/WriteFile overlapped (:100,128), FlushFileBuffers
    (:140,707), SetFilePointerEx/SetEndOfFile (:153,535), GetFileSizeEx (:158), MoveFileExW atomic replace + journal
    (:784, .journal files), GetLastError mapped to guest rc. Note :51 maps Wine's fsync EINVAL to "this FS does not flush".
    Uses mem::ww::OsReadScope/OsWriteScope around ReadFile/WriteFile into guest buffers (:93,120).
  • services/fs_romfs.cpp:509,528,536: CreateFileW + overlapped ReadFile (async host reads of the romfs), OsWriteScope (:528).
  • gfx/nvn/nvn_shaders.cpp: ReadFile (:1025), CreateFileW/WriteFile/SetFilePointerEx/FlushFileBuffers/MoveFileExW/
    DeleteFileW/GetFileSizeEx/GetFileAttributesW (shader preload pack, :1040-1221).
  • GetModuleFileNameA/W: crash.cpp:103, symbols.cpp:204,335, watchdog.cpp:245, play.cpp, play_ui_about.cpp:38,
    prompts.cpp:35, nvn_shaders.cpp:1688, album.cpp:52, pl.cpp:119, logfault.cpp:287, games/pkp/pkp_kbm.cpp:693,
    temporal_dlss.cpp:52, temporal_ffx.cpp:27, apps/launcher/game_info.cpp:191.
  • GetFileAttributesA/W: host_device.cpp:105, play.cpp:1236, watchdog.cpp:306-308, temporal_dlss.cpp:44,59,
    temporal_ffx.cpp:39, nvn_shaders.cpp:1038, tt_runner.cpp:192-207.
  • CopyFileA/DeleteFileA/CreateDirectoryA/MoveFileExA: play.cpp:1247,1255,431, watchdog.cpp:308, tt_core.cpp:157-159,
    tt_runner.cpp:138.
  • GetFullPathNameA + GetPrivateProfileStringA (INI): services/common.cpp:244-246.
  • Registry: RegGetValueA host_device.cpp:40 (SMBIOS HARDWARE\DESCRIPTION\System\BIOS) and services/acc.cpp:108
    (SOFTWARE\Microsoft\Cryptography\MachineGuid).
  • GetEnvironmentVariableA: host_device.cpp:53,77,100, sched.cpp (_strtoui64 of host_cpus).

What matters: open/read/write/seek/size/fsync/atomic-rename with share modes and overlapped (async) reads; MoveFileExW-style atomic
replace (rename); a GetModuleFileName-equivalent (/proc/self/exe); INI parsing (GetPrivateProfileString, custom already); registry
reads (→ /sys/class/dmi/id/* and /etc/machine-id); env vars. Most of this maps cleanly to POSIX; the overlapped read/ReadFile-fault
interaction with the write tracker (OsWriteScope/OsReadScope) is the subtle part.

Sockets
  • net/relay_server.cpp (embedded relay server), net/tcp.cpp, net/udp.cpp are Winsock: WSAStartup(MAKEWORD(2,2)) (counted;
    relay_server.cpp:62-67,1025, tcp.cpp:20, udp.cpp:18), socket/bind/listen/accept/connect/send/recv/sendto/recvfrom/select/ setsockopt/getsockopt/ioctlsocket/closesocket/shutdown, WSAGetLastError, ntohl/htons/htonl, getaddrinfo (tcp.cpp:46).
    Notable: udp.cpp:29/relay_server.cpp:943/coop_plat.c:101 disable WSAECONNRESET on ICMP port-unreachable; relay_server.cpp:904-908
    notes Wine needs SO_REUSEADDR for TIME_WAIT rebind; tcp.cpp:85 TCP_NODELAY; udp.cpp:44 SO_RCVTIMEO.
  • third_party/pokopia-coop/coop_plat.c + coop_disc.c are already dual-platform (#ifdef _WIN32 vs POSIX poll, SO_NOSIGPIPE,
    WSAPoll/poll). Not a porting blocker.
  • The guest bsd HLE (services/network.cpp → net/vsock.cpp) is portable C++ over vnet::Link; no host sockets.

What matters: a thin BSD-socket wrapper replacing WSAStartup (no-op on POSIX) and closesocket→close, ioctlsocket(FIONBIO)→
fcntl, select→poll (or keep select), and the ICMP-reset quirk (POSIX SOCK_DGRAM already returns ECONNREFUSED; guard with
MSG_NOSIGNAL/SO_NOSIGPIPE). The coop module is already the reference implementation.

Dynamic libraries
  • LoadLibraryW/ExW + GetProcAddress: temporal_dlss.cpp:209-214 (Streamline), temporal_ffx.cpp:90-98 (FFX SDK),
    audio_xaudio2.cpp:604 (LoadLibraryExW("xaudio2_9.dll", LOAD_LIBRARY_SEARCH_SYSTEM32)), apps/launcher/ui.cpp:328 (xinput1_4).
  • GetModuleHandleW(L"ntdll.dll") + GetProcAddress(..., "wine_get_version") is the pervasive Wine detection idiom
    (host_device.cpp:86-92, host_probe.cpp:23-24, gpu.cpp:1380, gpu_pool.cpp:82, pool_copy.cpp:55, memory.cpp:461, time.cpp:51);
    also GetProcAddress(ntdll, "NtDelayExecution") (time.cpp:55) and "NtQuerySystemInformation" (starvation_guard.cpp:163).
  • GetModuleHandleA(nullptr) for the exe base (symbols.cpp:237,272,325); tt_core.cpp:583 LoadLibraryA("advapi32.dll") for
    SystemFunction036 (RtlGenRandom).

What matters: dlopen/dlsym; the wine_get_version probe is a Windows-ism (→ always false / drop on native Linux); the "which DLL
is the host" checks become "which .so" — the plan stubs audio and upscalers first anyway.

Audio
  • services/audio_xaudio2.cpp: the XAudio2 host sink (IXAudio2, IXAudio2MasteringVoice, IXAudio2SourceVoice, callback
    OnBufferEnd, CoInitializeEx/CoUninitialize, CreateHrtfApo-less PCM path). Needs a Linux sink (SDL3 audio or PipeWire); the plan
    already says "audio stubbed" in phase 1, "through SDL3" in phase 3.
  • services/audio_devices.cpp: IMMDeviceEnumerator/IMMDevice/IMMDeviceCollection (WASAPI) + CoCreateInstance/
    CoTaskMemFree/PKEY_Device_FriendlyName — lists render endpoints for [audio] device and the start-up log.
  • audren/Integration/ThreadBoost.h: timeBeginPeriod(1) + avrt-style boost (#pragma comment(lib,"avrt.lib"),
    #pragma comment(lib,"winmm.lib")), SetThreadPriority(THREAD_PRIORITY_HIGHEST).
  • album.cpp:87: CoCreateInstance(CLSID_WICImagingFactory) (Windows Imaging Component) for screenshots.
  • The whole audren/ DSP is pure C++ (a Ryujinx C# port) — portable; only the sink and device listing are Windows.
Console / process
  • TerminateProcess(GetCurrentProcess(), code) is the hard-exit primitive (no destructors/at-exit): core/abi_glue.cpp:61,
    core/dispatch.cpp:295, diag/crash.cpp:264,278,285, diag/memguard.cpp:169, eh/unwind.cpp:558, gfx/play/play.cpp:462,1369,
    kernel/svc_memory.cpp:193, kernel/svc_thread.cpp:336, services/logfault.cpp:392, testtools/tt_core.cpp:320.
  • ExitThread (kernel/svc_thread.cpp:54 ExitProcess(0)), svc_thread.cpp:335,352 RaiseException(0xE0000003).
  • CreateProcessW (run the shader harness / prepare child): host_device.cpp:114, apps/launcher/game_info.cpp:106,499;
    WaitForSingleObject(pi.hProcess, 5000) + GetExitCodeProcess (host_device.cpp:115, game_info.cpp:531,592).
  • MessageBoxA (svc_memory.cpp:192), ShellExecute (host_device.cpp:124+), OutputDebugStringW (launcher/main.cpp:721,725),
    DebugBreak/IsDebuggerPresent (none in src). The launcher is Win32-GUI (RegisterClassExW, CommandLineToArgvW) but the runtime
    itself is console/main.

What matters: TerminateProcess→_exit/exit; CreateProcessW+wait→posix_spawn/fork+exec+waitpid; MessageBoxA is
optional (only for the out-of-memory box).


3. Compiler-specific code that gcc/clang on Linux would reject

  • __try/__except (SEH) — hard MSVC-only. 7 sites: src/gfx/nvn/nvn_pool_copy.cpp:152,154, nvn_tex_edit.cpp:75,83,
    nvn_texprep.cpp:86,96,102, src/testtools/tt_game.cpp:40,179; plus GetExceptionCode()/EXCEPTION_EXECUTE_HANDLER.
    No __finally found.
  • __declspec — only in third_party/: amd_ffx_api/api/include/ffx_api.h:29 (__declspec(dllexport)),
    nvidia_nis/NIS_Config.h:36 (__declspec(align(x))), nvidia_streamline/include/sl_core_api.h:38 (__declspec(dllexport)).
    No __declspec in src/, include/ or apps/.
  • _aligned_malloc/_aligned_free — not used in src (0 hits); alignment uses alignas/std::atomic/align_up. (Verify: only the
    NIS header's __declspec(align) macro above.)
  • MSVC intrinsics: __rdtsc (include/nxrt/ftrace.h:32, diag/ftrace.cpp:113-245), _mm_pause (gfx/frame_limiter.cpp:104,
    <emmintrin.h>), _umul128 (gfx/nvn/nvn_pipeline.cpp:306), __cpuid (gfx/nvn/nvn_shaders.cpp:58). Portable already:
    __builtin_ctzll, __builtin_popcountll, __builtin_memcpy (used in mem/write_watch.cpp, kernel/sched.cpp, include/nxrt/ipc.h,
    services.h). Each intrinsic has a GCC/Clang equivalent or <immintrin.h> path.
  • #pragma comment(lib, ...) (ignored/warned by gcc, must be dropped or guarded): apps/launcher/page_keys.cpp:16 (uxtheme),
    src/diag/symbols.cpp:22 (dbghelp), gfx/extras/temporal_dlss.cpp:24-25 (wintrust, crypt32), gfx/extras/win_display.cpp:21-22
    (dxgi, user32), media/movie_mf.cpp:55-59 (mfplat, mfreadwrite, mfuuid, shlwapi, ole32), net/lobby.cpp:31 + net/relay_server.cpp:39
    • services/misc.cpp:33 (bcrypt), net/relay_server.cpp:38 (ws2_32), :39 (iphlpapi), net/tcp.cpp:10 + net/udp.cpp:9 (ws2_32),
      services/album.cpp:33-34 (windowscodecs, ole32), services/audio_devices.cpp:13-14 (ole32, uuid), services/audio_xaudio2.cpp:37
      (xaudio2), services/audren/Integration/ThreadBoost.h:13-14 (avrt, winmm).
  • _MSC_VER / _M_X64 branches: include/nxrt/ftrace.h:13, src/gfx/nvn/nvn_pipeline.cpp:26,304. _WIN32 branches (need a
    POSIX side): nvn_gpl.cpp:40,346,645, nvn_pipeline.cpp:29, nvn_texup.cpp:7,63, play/prompts.cpp:6,33, net/lobby.cpp:22,164,
    services/acc.cpp:35,105, services/pl.cpp:19,117, services/time.cpp:53,177,187, services/timezone.cpp:18,317,456.
  • Wide-char Win32 calls (L"...", W suffix, std::wstring paths, MultiByteToWideChar/WideCharToMultiByte): pervasive in
    temporal_dlss.cpp, temporal_ffx.cpp, nvn_shaders.cpp, fs_volume.cpp, fs_romfs.cpp, album.cpp, audio_*, host_device.cpp,
    timezone.cpp, apps/launcher/*. On POSIX these collapse to UTF-8 char/std::string.
  • SetUnhandledExceptionFilter/AddVectoredExceptionHandler/EXCEPTION_POINTERS/CONTEXT/EXCEPTION_RECORD types: diag/crash.cpp,
    diag/stackwalk.h/cpp, mem/write_watch.cpp (→ siginfo_t/ucontext_t/sigaction).
  • RtlLookupFunctionEntry/RtlVirtualUnwind (ntdll): src/diag/stackwalk.cpp:13,23 (host stack walk in the crash dump) →
    _Unwind_Backtrace/backtrace().
  • PROCESS_POWER_THROTTLING_STATE / SetProcessInformation / SetThreadInformation(ThreadPowerThrottling): sched.cpp:265,
    nvn_gpl.cpp:659 (Win11-specific, #if-able).
  • _strtoui64 (sched.cpp:167), snprintf/vsnprintf (portable), __attribute__((format)) already guarded for
    __clang__/__GNUC__ (diag/crash.cpp:58, include/nxrt/log.h:44) — the code is already partially GCC-aware.
  • No SAL annotations found in src/ (0 hits for _In_/_Out_/_Ret_/__checkReturn).
  • #pragma pack(push, 1) (elf.h, audren_types.h, Performance*.h) and #pragma once are portable (both compilers accept them) — not blockers.

4. Third-party Windows-only dependencies

Third-party Where Windows-only? Can the runtime build without it?
nvidia_streamline (SL) third_party/nvidia_streamline/include/*, src/gfx/extras/temporal_dlss.cpp Yes (headers MIT, but loads sl.interposer.dll/sl.dlss.dll/nvngx_dlss.dll) Yes — DLSS/DLAA are runtime-selected and nothing is linked; keep off on native Linux at first (plan agrees).
amd_ffx_api (FidelityFX SDK) third_party/amd_ffx_api/*, src/gfx/extras/temporal_ffx.cpp DLL on Windows (LoadLibrary + GetProcAddress of ffxCreateContext etc.); the FFX SDK has a Linux Vulkan path (libffx) Yes — FSR 3 / XeSS temporal path off on native Linux at first; the loader header (ffx_api_loader.h:56-60) is the only Win32 bit.
ffx_fsr1 (FSR 1) third_party/ffx_fsr1/, src/gfx/extras/fsr1_consts.cpp No — shader + CPU consts (MIT), portable n/a — keeps working.
nvidia_nis (NIS) third_party/nvidia_nis/, src/gfx/extras/nis_spatial.cpp No — shader-based (MIT); only NIS_Config.h __declspec(align) macro is MSVC-flavoured n/a — keeps working (fix the one macro).
pokopia-coop third_party/pokopia-coop/ No — portable C11, coop_plat.c/coop_disc.c already #ifdef _WIN32 vs POSIX n/a — builds on Linux already.
libvpx (media_deps.cmake) src/media/video_codec.cpp No — prebuilt from vcpkg on Windows today, but builds on Linux; guarded by NXRT_HAVE_LIBVPX Yes — without it, Switch 2 movie decoders are compiled out.
tools/textures astc2bc7/bc7e_ispc cmake/gfx.cmake:21-27 Yes today — prebuilt .lib + astcdec-*-shared.dll; the ISPC build is x64-only, not recompiled for Linux Needs a Linux build of tools/textures (ISPC is cross-platform) before the gfx shell links.
tools/tiling (tegra_tiling.cpp) cmake/gfx.cmake:16 No — compiled from source n/a — portable.
dbghelp src/diag/symbols.cpp Windows — UnDecorateSymbolName + MSVC .map format (lld-link /MAP) The symboliser is Windows-specific; on Linux use addr2line/DWARF or a symbol-server dump.
psapi CMakeLists.txt:47 Windows — GetProcessMemoryInfo/GetProcessHandleCount Replace with /proc/self/statm, /proc/self/fd.
dxgi (win_display.cpp) src/gfx/extras/win_display.cpp Windows — DXGI for display/HDR mode enumeration The Vulkan path is SDL3 (portable); win_display is an extra (HDR/display info) to port or stub.
xaudio2, mmdeviceapi, mfplat/mfreadwrite audio_xaudio2.cpp, audio_devices.cpp, movie_mf.cpp Windows Stub/port (SDL3 audio, PipeWire; Media Foundation → libav/GStreamer or keep movies off).

volk, VMA, Dear ImGui, zstd, SDL 3.4.18, Vulkan-Headers are all pinned, fetched and built from source (cmake/gfx_deps.cmake) and portable
(only VK_USE_PLATFORM_WIN32_KHR is defined at gfx_deps.cmake:68; a POSIX build sets VK_USE_PLATFORM_XLIB_KHR/WAYLAND_KHR).


5. Summary table

Family Key files Call sites (approx) Proposed os.h function(s) / std:: replacement Notes / risks
Memory mem/memory.cpp, kernel/svc_memory.cpp VirtualAlloc ~13, VirtualProtect ~21, MapViewOfFile(Ex) ~7, VirtualQuery ~15, VirtualFree ~15, CreateFileMapping 1 os_reserve(addr,size), os_commit(addr,size,prot), os_decommit, os_protect, os_query(addr)→{state,prot,size}, os_map_fixed, os_mirror/os_section_view (memfd) Exact-address reserve, 64 KiB granule vs 4 KiB page, SEC_RESERVE section + mirrored views, MEM_DECOMMIT-refused-on-view quirk, fresh-commit=zero. Hardest part.
Faults/exceptions mem/write_watch.cpp, diag/crash.cpp, diag/stackwalk.cpp, 3×__try files VEH 2 + filter 1, __try 7 os_install_fault_handler(prio, fn) (sigaction + sigaltstack), os_stack_guard, os_terminate(code) VEH ordering (ww=1 before crash=0), EXCEPTION_CONTINUE_EXECUTION (retry), SEH __try→sigsetjmp, stack-overflow on helper thread.
Threads/priority/affinity kernel/thread.cpp, kernel/sched.cpp, kernel/starvation_guard.cpp CreateThread 1+adopt, SetThreadPriority ~13, affinity ~5, priority-class ~3 os_thread_create(stack, fn), os_set_priority(prio band), os_set_affinity(mask, ideal), os_current_cpu() 6 priority bands, boost off, ideal-vs-affinity, sched_getcpu, core topology + efficiency class.
Locks/CV/waits os/sync.cpp, kernel/kernel_sync.cpp, kernel/handles.cpp, thread.cpp SRWLOCK ~15, CONDITION_VARIABLE ~10, SleepConditionVariableSRW, WaitForSingleObject ~13 std::mutex/std::shared_mutex, std::condition_variable (C++20 atomic_wait) Zero-init valid; exclusive/shared non-recursive; FIFO wake; timeout waits. Low risk.
Time/sleep/timers kernel/time.cpp, kernel/precise_wait.cpp, gfx/frame_limiter.cpp, diag/ftrace.cpp QPC ~30, CreateWaitableTimer ~6, NtDelayExecution 1 (via GetProcAddress), Sleep many os_monotonic_ns() (CLOCK_MONOTONIC_RAW), os_sleep_ns (timerfd/clock_nanosleep), os_wall_ns µs short-sleep precision, 100 ns timer units, monotonic (no overflow), timer slack vs SCHED_FIFO.
Files/mapping/ini/registry services/fs_volume.cpp, fs_romfs.cpp, gfx/nvn/nvn_shaders.cpp, diag/crash.cpp CreateFileW/ReadFile/WriteFile/FlushFileBuffers/MoveFileExW ~40 std::filesystem + POSIX open/read/write/fsync/rename; os_exe_path(); os_read_dmi()/os_machine_id() Overlapped (async) reads; atomic replace; OsRead/WriteScope ↔ write tracker; INI; registry → /sys/dmi, /etc/machine-id.
Sockets net/{relay_server,tcp,udp}.cpp WSAStartup ~7, socket/bind/send/recv/select ~80 thin BSD wrapper (no-op WSAStartup, closesocket→close, ioctlsocket→fcntl, select→poll) ICMP ECONNRESET quirk, SO_REUSEADDR under Wine, TCP_NODELAY, SO_RCVTIMEO. coop module is the reference.
Dynamic libraries temporal_dlss.cpp, temporal_ffx.cpp, audio_xaudio2.cpp, several "wine?" probes GetProcAddress ~15, LoadLibrary ~5 dlopen/dlsym wine_get_version probe → drop on native; load-by-name of upscaler DLLs → .so.
Audio audio_xaudio2.cpp, audio_devices.cpp, audren/Integration/ThreadBoost.h XAudio2, IMMDevice 6, CoInitialize ~4 SDL3 audio / PipeWire sink; os_audio_devices() Stub in phase 1; the audren DSP is already portable C++.
Console/process core/*, diag/*, kernel/svc_memory.cpp, host_device.cpp TerminateProcess ~12, CreateProcessW 2 _exit, posix_spawn+waitpid Hard exit without at-exit; child process run (shader harness).
Compiler-specific — — — Drop __try (7), #pragma comment(lib) (~20), wide-char; port __rdtsc/_mm_pause/_umul128/__cpuid; remove _MSC_VER/_WIN32 branches.

Gotchas / things that look hard to port

  1. Mirrored/mapped views are the crux. The heap is one SEC_RESERVE section with primary + alias views (mem/memory.cpp); GPU pool
    imports and MapMemory depend on seeing the same page at two addresses. POSIX: a memfd/shm_open fd mapped at multiple addresses
    (anonymous, so amdgpu userptr import works), mmap MAP_FIXED_NOREPLACE for exact addresses. The Wine path already loses aliasing
    (falls back to private memory) — the native port can do better with memfd.
  2. Fault-handler semantics. The write tracker and the crash handler both rely on VEH ordering and on EXCEPTION_CONTINUE_EXECUTION
    (retry the faulting instruction). On Linux si_addr + ucontext this is sigaction returning after fixing the page, but the handler
    must not recurse, must run on a sigaltstack, and the SEH __try blocks (safe memcpy over guest memory) need sigsetjmp/siglongjmp
    or a manual mincore/process_vm_readv approach.
  3. Exact-address reservations above 47 bits. All guest bases (0x60..0x7E × 2^40) are in a range a normal Linux process with ASLR off
    (or vm.mmap_rnd_bits=0 / personality(ADDR_NO_RANDOMIZE)) can mmap MAP_FIXED_NOREPLACE; needs the process to not use
    HIGHENTROPYVA-style layouts. Worth an explicit note.
  4. 64 KiB allocation granularity vs 4 KiB page. Section views and fixed reservations must be 64 KiB aligned; MapPhysicalMemory tracks
    per-64 KiB granule with a 16-bit page mask. POSIX mmap is page-granular; the 64 KiB alignment is just an address constraint, not a
    hard property, but MEM_DECOMMIT-on-a-view is Windows-specific (heap_decommit emulates with PAGE_NOACCESS).
  5. Timing is load-bearing. QPC-based system_tick, 100 ns waitable timers, NtDelayExecution short sleeps, and the precise-wait
    lateness estimator are tuned to Windows/Wine behaviour. Linux CLOCK_MONOTONIC/timerfd match the clock and timer shape, but the short
    sleep (<200 µs) precision and the timer-lateness estimates will need re-tuning.
  6. TerminateProcess everywhere means no C++ at-exit/destructor runs — a POSIX _exit keeps that contract; std::thread-backed guest
    threads and the t_keepalive/ExitThread pattern (thread.cpp:30) must map carefully to pthread_exit.
  7. Windows-only media/audio/display extras (Media Foundation movie_mf.cpp, XAudio2, WASAPI device list, DXGI win_display.cpp,
    dbghelp symboliser, psapi) are isolated to a handful of files and are the natural "stub first" targets; the plan already says audio is
    stubbed in phase 1.

Not covered / limits of this catalog

  • No build attempt, no code changes (read-only mission). Counts are from grep -rInE over the tree at d6b809a; the "~N" figures in the
    summary table are approximate and should be re-counted when scoping each conversion PR.
  • apps/launcher/* (the Win32-GUI launcher) is catalogued but is out of scope for os.h — the Linux launcher is the Tauri app; only the
    runtime's games/pkp/pkp_kbm.cpp and src/* matter for the native pkp port.
  • third_party/pokopia-coop was not re-audited line-by-line (already portable per the plan); only its coop_plat.c/coop_disc.c dual-platform
    nature was confirmed.
  • The exact POSIX replacement for tools/textures (astc2bc7/bc7e_ispc prebuilt .lib + astcdec-*.dll) was not investigated — flagged as a
    build-system blocker for nxrt_gfx rather than an os.h concern.

6. Complete call-site index (the 25 key Win32 APIs, non-third_party)

Measured with git grep -n -I -E '\b<api>\s*\(' -- runtime (third_party excluded). 209 call sites in total; comment/log-string
mentions are included because the code names them. Some file:line appear under two APIs (e.g. tt_core.cpp:583 is both
GetProcAddress and LoadLibrary).

  • VirtualAlloc (10): src/diag/ftrace.cpp:311, src/kernel/svc_memory.cpp:147, 150, 695, 708, src/mem/memory.cpp:277, 319, 464, 466, 544
  • VirtualFree (15): src/diag/ftrace.cpp:314, src/kernel/svc_memory.cpp:151, 166, 167, 755, 762, 814, src/mem/memory.cpp:225, 243, 245, 286, 303, 334, 468, 574
  • VirtualProtect (12): src/mem/memory.cpp:357, 383, 588, src/mem/write_watch.cpp:52, 185, 189, 248, 424, 464, 496, 497, 650
  • MapViewOfFile (1): src/mem/memory.cpp:682
  • CreateFileMapping (2): src/mem/memory.cpp:479, 483
  • AddVectoredExceptionHandler (2): src/diag/crash.cpp:320, src/mem/write_watch.cpp:385
  • SetThreadPriority (15): src/gfx/nvn/nvn_gpl.cpp:359, 650, src/gfx/nvn/nvn_shaders.cpp:1132, src/gfx/nvn/nvn_tex_edit.cpp:166, src/gfx/nvn/nvn_texprep.cpp:253, 256, src/gfx/nvn/nvn_texup.cpp:64, src/gfx/scene_runner.cpp:100, 152, src/kernel/sched.cpp:335, src/kernel/starvation_guard.cpp:162, 239, src/services/audren/Integration/ThreadBoost.h:25, 35, 40
  • SetThreadAffinityMask (3): src/kernel/sched.cpp:319, 331, src/kernel/starvation_guard.cpp:236
  • CreateThread (2): src/diag/crash.cpp:296, src/kernel/thread.cpp:147
  • CreateWaitableTimerEx (6): src/gfx/frame_limiter.cpp:74, 111, src/kernel/precise_wait.cpp:58, 61, src/kernel/time.cpp:68, src/timestep/timestep.cpp:192
  • NtDelayExecution (1): src/kernel/time.cpp:40
  • QueryPerformanceCounter (20): src/diag/ftrace.cpp:105, 180, 241, 244, src/diag/gauge.cpp:42, src/diag/log.cpp:99, 117, src/gfx/frame_limiter.cpp:279, src/kernel/precise_wait.cpp:48, src/kernel/time.cpp:30, 95, 99, 128, src/os/sync.cpp:199, src/testtools/tt_core.cpp:258, 291, 394, 548, 552, src/timestep/timestep.cpp:129
  • QueryPerformanceFrequency (12): src/diag/ftrace.cpp:58, src/diag/gauge.cpp:46, src/diag/log.cpp:98, src/gfx/frame_limiter.cpp:275, src/kernel/precise_wait.cpp:44, src/kernel/time.cpp:26, 94, 127, src/os/sync.cpp:195, src/testtools/tt_core.cpp:393, 547, src/timestep/timestep.cpp:125
  • WaitForSingleObject (15): apps/launcher/game_info.cpp:590, apps/launcher/main.cpp:475, src/diag/crash.cpp:298, src/gfx/frame_limiter.cpp:81, src/host_device.cpp:115, src/kernel/precise_wait.cpp:118, 125, 132, 142, src/kernel/thread.cpp:213, 260, src/kernel/time.cpp:76, src/services/fs_volume.cpp:182, 195, src/timestep/timestep.cpp:204
  • WaitForMultipleObjects (1): src/kernel/precise_wait.cpp:137
  • GetProcAddress (16): apps/launcher/ui.cpp:331, src/diag/host_probe.cpp:24, src/gfx/extras/temporal_dlss.cpp:214, src/gfx/extras/temporal_ffx.cpp:95, 96, 97, 98, src/gfx/nvn/nvn_gpu.cpp:1381, src/gfx/nvn/nvn_gpu_pool.cpp:83, src/gfx/nvn/nvn_pool_copy.cpp:56, src/host_device.cpp:89, src/kernel/starvation_guard.cpp:163, src/kernel/time.cpp:52, 55, src/mem/memory.cpp:462, src/testtools/tt_core.cpp:583
  • LoadLibrary (6): apps/launcher/ui.cpp:328, src/gfx/extras/temporal_dlss.cpp:209, 211, src/gfx/extras/temporal_ffx.cpp:90, src/services/audio_xaudio2.cpp:604, src/testtools/tt_core.cpp:583
  • WSAStartup (4): src/net/relay_server.cpp:67, 1026, src/net/tcp.cpp:20, src/net/udp.cpp:19
  • InitializeSRWLock (4): src/os/sync.cpp:56, 76, 88, 100
  • AcquireSRWLockExclusive/Shared (44): src/kernel/handles.cpp:19, 36, 45, 55, 63, 80, src/kernel/kernel_sync.cpp:36, 100, 131, src/kernel/thread.cpp:41, 123, 136, 202, 263, src/mem/write_watch.cpp:56, 61, src/os/sync.cpp:141, 163, 171, 237, 249, 266, 276, 303, 318, 339, 347, 366, 383, 401, 409, 434, 447, 467, 476, 487, 498, 514, 527, 541, 554, 564, 578, 582
  • SleepConditionVariableSRW (6): src/kernel/kernel_sync.cpp:97, 104, src/os/sync.cpp:222, 229, 250, 357
  • WakeConditionVariable (5): src/kernel/kernel_sync.cpp:109, src/os/sync.cpp:241, 393, 479, 546
  • WakeAllConditionVariable (6): src/os/sync.cpp:440, 456, 470, 481, 517, 548
  • RegOpenKeyEx (0): not used — the runtime reads the registry via RegGetValueA (src/host_device.cpp:40, src/services/acc.cpp:108) instead.
  • timeBeginPeriod (1): src/services/audren/Integration/ThreadBoost.h:57
Lenguaje dominante
C++
Estrellas
224
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de featureJosh/Recompia

Todos los issues de featureJosh/Recompia

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.