AnyPS5/core/libs/prx/libc/include/general
fdfawef324 58669dc134 fix(libc): write each log line in one call
mingw's fprintf writes an unbuffered stream a character at a time and
holds the stream's lock for the whole line. The APS5_LOG_* lines that
carry a RecompileRequest ("Shader ... could not be prepared after
registration", 15-20 KB each) took one WriteFile per character, and every
other thread writing to stderr waited behind them, guest calls that log
included. Demon's Souls (PPSA01342 v1.005, Windows) stops on a black
screen after two frames on main: a BPE job worker waits for the stderr
lock in sceSaveDataDirNameSearch's trace while the shader preparation
pool prints its dumps, so GameCoreLoop never finishes a frame.

The log macros now format the line into memory and write it with one
fwrite, as Driver::reportSkip does since 8cf2f6580. The UCRT writes an
unbuffered stream's fwrite as one even-length block and the last byte,
so a line takes at most two writes on Windows and one on Linux.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 13:23:21 -04:00
..
AsmMacros.hpp feat(libkernel): implement getcontext, setcontext and makecontext 2026-10-11 13:00:38 +03:00
ExportMacros.hpp feat(libs): add new libSceAgc unknown functions 2026-09-10 09:43:59 +03:00
LogMacros.hpp fix(libc): write each log line in one call 2026-10-11 13:23:21 -04:00
VabiMacros.hpp feat(libs): sysv abi macros for windows exports 2026-09-10 13:30:05 +03:00