yuzu-mainline/src/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
..
fs common: fs: fs_util: Add BufferToUTF8String 2021-07-27 00:02:22 -04:00
logging logging: Simplify and make thread-safe 2021-08-13 18:39:45 +00:00
x64 common: Merge uint128 to a single header file with inlines. 2021-02-15 14:46:04 -08:00
algorithm.h common: Make use of [[nodiscard]] where applicable 2020-08-15 17:17:52 -04:00
alignment.h common: alignment: Add DivideUp utility method. 2021-02-18 16:16:24 -08:00
assert.cpp common: Move settings to common from core. 2021-04-14 16:24:03 -07:00
assert.h assert: Verify formatting 2021-08-05 17:46:22 +00:00
atomic_ops.h X86/NativeClock: Reimplement RTDSC access to be lock free. 2021-01-02 04:00:27 +01:00
bit_cast.h common/bit_cast: Add function matching std::bit_cast without constexpr 2020-11-20 01:52:37 -03:00
bit_field.h common: Make use of [[nodiscard]] where applicable 2020-08-15 17:17:52 -04:00
bit_set.h common: BitSet: Various style fixes based on code review feedback. 2020-12-06 00:27:13 -08:00
bit_util.h fixup! common: bit_util: Add BIT macro. 2021-05-05 16:40:54 -07:00
cityhash.cpp common/cityhash: Use common types 2021-02-18 00:45:17 -03:00
cityhash.h common: add missing header after f3805376f7 2021-02-23 00:04:32 +00:00
CMakeLists.txt Merge pull request #6585 from ameerj/hades 2021-07-25 11:39:04 -07:00
common_funcs.h common_funcs: Move R_ macros to result.h 2021-05-31 16:41:00 -04:00
common_types.h gpu: Move GPUVAddr definition to common_types. 2019-03-20 22:36:02 -04:00
concepts.h k_priority_queue: Fix concepts use 2020-12-29 14:33:41 -05:00
detached_tasks.cpp common/detached_tasks: Wait for tasks before shutting down 2021-06-22 04:27:44 -03:00
detached_tasks.h Review comments - part 5 2018-10-02 16:04:10 +02:00
div_ceil.h common/div_ceil: Return numerator type 2021-01-09 03:16:10 -03:00
dynamic_library.cpp common: Silence two discarded result warnings 2020-08-16 06:17:33 -04:00
dynamic_library.h common: Make use of [[nodiscard]] where applicable 2020-08-15 17:17:52 -04:00
fiber.cpp fiber: Double default stack size 2021-03-10 20:37:56 +00:00
fiber.h common: Fiber: use a reference for YieldTo. 2021-03-07 13:46:53 -08:00
hash.h common: Make use of [[nodiscard]] where applicable 2020-08-15 17:17:52 -04:00
hex_util.cpp partition_data_manager: Make data arrays constexpr 2020-08-06 02:41:58 -04:00
hex_util.h hex_util: Fix incorrect array size in AsArray 2021-08-04 22:16:29 -04:00
host_memory.cpp host_memory: Add workaround for FreeBSD 12 2021-07-27 20:15:23 +00:00
host_memory.h common/host_memory: Implement a fallback if fastmem fails. 2021-06-11 17:27:17 +02:00
intrusive_red_black_tree.h fixup! common: intrusive_red_black_tree: Disable static_assert that will not evaluate as constant on MSVC. 2021-05-05 16:40:54 -07:00
literals.h common: Replace common_sizes into user-literals 2021-06-24 09:27:40 -07:00
lz4_compression.cpp lz4_compression: Make use of std::span 2021-05-24 15:00:59 -04:00
lz4_compression.h lz4_compression: Make use of std::span 2021-05-24 15:00:59 -04:00
math_util.h core: Fix clang build pt.3 2020-10-21 22:14:23 -04:00
memory_detect.cpp common: switch to nullptr for sysctl's empty new value 2020-06-30 23:00:18 +00:00
memory_detect.h common: Make use of [[nodiscard]] where applicable 2020-08-15 17:17:52 -04:00
microprofile.cpp Integrate the MicroProfile profiling library 2015-08-24 22:16:28 -03:00
microprofile.h Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
microprofileui.h Common: Remove section measurement from profiler (#1731) 2016-04-29 00:07:10 -07:00
misc.cpp [network] Error handling reform 2021-02-28 17:25:31 -05:00
nvidia_flags.cpp common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270) 2021-05-25 19:32:56 -04:00
nvidia_flags.h nvidia_flags: Add missing header guard 2021-04-12 19:18:48 -04:00
page_table.cpp core/memory: Check our memory fallbacks for out-of-bound behavior. 2021-05-29 09:28:26 +02:00
page_table.h core: Make use of fastmem 2021-06-11 17:27:06 +02:00
param_package.cpp citra_qt/configuration: misc input tab improvements 2018-10-06 15:43:49 +02:00
param_package.h Project Mjölnir: Part 1 2020-08-26 02:32:32 -04:00
parent_of_member.h parent_of_member: Make sign conversion explicit in OffsetOfImpl() 2021-05-10 08:07:33 -04:00
point.h common: Extract point into a common struct 2021-05-28 08:12:49 -04:00
quaternion.h Implement a basic class for motion devices 2020-08-27 17:19:21 -05:00
ring_buffer.h ring_buffer: Remove granularity template argument 2021-02-06 19:16:00 +00:00
scm_rev.cpp.in cmake: Remove shader cache version 2021-07-22 21:51:40 -04:00
scm_rev.h common: Add additional SCM revision fields 2019-10-05 00:09:49 -04:00
scope_exit.h common: scope_exit: Add a cancellable ScopeExit macro. 2021-02-05 14:03:36 -08:00
settings_input.cpp common: Move settings to common from core. 2021-04-14 16:24:03 -07:00
settings_input.h common: Move settings to common from core. 2021-04-14 16:24:03 -07:00
settings.cpp Merge pull request #6696 from ameerj/speed-limit-rename 2021-07-26 18:51:00 -07:00
settings.h settings: Fix MSVC issues 2021-08-11 17:12:14 -04:00
spin_lock.cpp Core/Common: Address Feedback. 2020-06-27 18:20:06 -04:00
spin_lock.h General: Fix clang build 2020-11-05 10:07:16 -05:00
stream.cpp video_core: NVDEC Implementation 2020-10-26 23:07:36 -04:00
stream.h common/stream: Be explicit with copy and move operators 2020-10-29 22:57:35 -04:00
string_util.cpp common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270) 2021-05-25 19:32:56 -04:00
string_util.h common: fs: Rework the Common Filesystem interface to make use of std::filesystem (#6270) 2021-05-25 19:32:56 -04:00
swap.h general: Fix various spelling errors 2021-01-02 10:23:41 -05:00
telemetry.cpp common/telemetry: Migrate namespace into the Common namespace 2020-08-18 15:08:32 -04:00
telemetry.h video_core: Resolve more variable shadowing scenarios pt.3 2020-12-05 16:02:23 -05:00
thread_queue_list.h Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
thread_worker.h shader_recompiler,video_core: Cleanup some GCC and Clang errors 2021-07-22 21:51:26 -04:00
thread.cpp Fix thread naming on Linux, which limits names to 15 bytes. 2020-08-05 20:34:49 -07:00
thread.h common/thread: Fix data race in is_set 2020-08-26 02:50:51 +00:00
threadsafe_queue.h common/threadsafe_queue: Provide Wait() method. 2021-04-07 22:38:52 +02:00
time_zone.cpp Revert "common/time_zone: Simplify GetOsTimeZoneOffset()" 2020-08-19 18:27:31 -04:00
time_zone.h common: Make use of [[nodiscard]] where applicable 2020-08-15 17:17:52 -04:00
tiny_mt.h common: Add implementation of TinyMT (Mersenne Twister RNG). 2021-02-18 16:16:24 -08:00
tree.h common: tree: Avoid a crash on nullptr dereference. 2021-05-20 21:41:51 -07:00
uint128.h common: wall_clock: Fix integer overflow with StandardWallClock. 2021-02-19 18:04:23 -08:00
unique_function.h common: Add unique function 2021-07-08 19:03:19 -03:00
uuid.cpp common: uuid: Add hex string to UUID constructor 2021-08-04 10:45:41 -04:00
uuid.h common: uuid: Add hash function for UUID 2021-08-06 00:41:55 -04:00
vector_math.h input_common/CMakeLists: Make some warnings errors 2020-10-15 19:37:51 -04:00
virtual_buffer.cpp page_table: Allow page tables to be moved 2020-11-17 20:08:20 -05:00
virtual_buffer.h core/memory: Read and write page table atomically 2020-12-29 21:54:49 -03:00
wall_clock.cpp common: wall_clock: Fix integer overflow with StandardWallClock. 2021-02-19 18:04:23 -08:00
wall_clock.h audio_core: Make shadowing and unused parameters errors 2020-12-03 00:54:31 -05:00
zstd_compression.cpp zstd_compression: Make use of std::span 2021-05-24 15:01:04 -04:00
zstd_compression.h zstd_compression: Make use of std::span 2021-05-24 15:01:04 -04:00