mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-18 12:08:38 +00:00
plat_thread_id() made a gettid syscall on every call, about 700,000 times a second in the open world (plat_rmutex_lock asks on every acquire). A thread's id never changes and the runtime does not fork, so the first call on each thread keeps it in a thread-local. noinline keeps a caller from reusing the thread-local's address across a fiber switch, since a fiber may resume on another thread. Fixes #236.