2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00
yuzu/src/tests/common
yzct12345 001675dced
logging: Simplify and make thread-safe
This simplifies the logging system.

This also fixes some lost messages on startup.

The simplification is simple. I removed unused functions and moved most things in the .h to the .cpp. I replaced the unnecessary linked list with its contents laid out as three member variables. Anything that went through the linked list now directly accesses the backends. Generic functions are replaced with those for each specific use case and there aren't many. This change increases coupling but we gain back more KISS and encapsulation.

With those changes it was easy to make it thread-safe. I just removed the mutex and turned a boolean atomic. I was planning to use this thread-safety in my next PR about stacktraces. It was actually async-signal-safety at first but I ended up using a different approach. Anyway getting rid of the linked list is important for that because have the list of backends constantly changing complicates things.
2021-08-13 18:39:45 +00:00
..
bit_field.cpp tests: Fix warning about comparison between signed and unsigned 2020-11-27 17:41:20 -05:00
cityhash.cpp common/cityhash: Use common types 2021-02-18 00:45:17 -03:00
fibers.cpp common: Fiber: use a reference for YieldTo. 2021-03-07 13:46:53 -08:00
host_memory.cpp common: Replace common_sizes into user-literals 2021-06-24 09:27:40 -07:00
param_package.cpp logging: Simplify and make thread-safe 2021-08-13 18:39:45 +00:00
ring_buffer.cpp ring_buffer: Remove granularity template argument 2021-02-06 19:16:00 +00:00
unique_function.cpp shader_recompiler,video_core: Cleanup some GCC and Clang errors 2021-07-22 21:51:26 -04:00