dhewm3/neo/sys
Daniel Gibson d5fd0990a1 Win32: Fix deadlocks if Sys_Printf() or Sys_Error() was called in thread
If those functions (e.g. called by common->Printf(), common->Error())
weren't called from the mainthread and win_outputEditString was set to 1,
a deadlock could occur.
Specifically, the async thread (handling sound) was calling
common->Warning() -> Sys_Printf() -> Conbuf_AppendText() which called
SendMessageA() which blocks until the main thread handles the message.
The main thread however was in idSampleDecoderLocal::Decode() trying to
enter CRITICAL_SECTION_ONE, which was held by the async thread
(it's used to synchronize sound handling between main and async thread).

So now if Sys_Printf() (or Sys_Error() which should have the same problem)
is not called by the main thread, the text is buffered and
Conbuf_AppendText() is called for the buffered lines in the next frame
in Win_Frame().
2021-06-20 03:36:39 +02:00
..
aros # move the AROS specific folder icon and default.cfg mmakefile.src under neo/sys/aros/setup 2017-04-22 16:21:14 +02:00
cmake Use stb_vorbis instead of libogg and libvorbis(file) 2021-04-27 20:08:59 +02:00
linux Add Posix_GetExePath() function 2021-05-12 07:44:07 +02:00
osx Add Posix_GetExePath() function 2021-05-12 07:44:07 +02:00
posix Use backtrace in crash handler on POSIX platforms 2021-05-12 07:56:57 +02:00
stub Do gamma correction (r_gamma, r_brightness) in shaders 2021-06-20 03:36:39 +02:00
win32 Win32: Fix deadlocks if Sys_Printf() or Sys_Error() was called in thread 2021-06-20 03:36:39 +02:00
cpu.cpp Fix sys/cpu.cpp for msvc 64bit 2012-07-06 01:06:59 +02:00
doom_icon.h Window Icon, make in_nograb work with SDL2 2015-03-02 00:03:30 +01:00
events.cpp Make switching from Radiant to game work 2020-07-20 05:06:57 +02:00
glimp.cpp Fix endless loop in GLimp_Init(), #386 2021-06-20 03:36:39 +02:00
platform.h Fix ID_MAYBE_INLINE on non-Windows platforms 2020-01-16 20:43:38 +01:00
sys_local.cpp Get rid of Sys_FPU_StackIsEmpty() 2012-07-06 01:06:53 +02:00
sys_local.h Get rid of Sys_FPU_StackIsEmpty() 2012-07-06 01:06:53 +02:00
sys_public.h Add SysIsMainThread() function 2021-06-20 03:36:39 +02:00
threads.cpp Add SysIsMainThread() function 2021-06-20 03:36:39 +02:00