Nekotekina
786510a937
Use gettid() on Linux, don't use std: 🧵 :id
...
pthread_self() returns a large opaque pointer which is harder to use.
2022-07-10 12:22:28 +03:00
DH
cccfb89aa0
[Config] Use std::less<> for std::map<...>
...
Reduces amount of string copies
[Utilities] fmt::replace_all: avoid creation of temporary strings
2021-12-02 21:36:57 +03:00
Nekotekina
c646476ca8
logs.hpp: another fixup for RPCS3.log
...
Don't print channel names for initial messages.
2021-05-21 00:41:37 +03:00
Nekotekina
04cac6cd33
logs.hpp: refactoring (logs::message)
...
Make .error/.warning/... callable objects which can be pointed to.
Make .always() more hard to access.
Memory layout optimizations.
2021-05-20 01:08:32 +03:00
Nekotekina
963d150e93
Fix some -Weffc++ warnings (part 2)
2021-04-03 21:54:15 +03:00
Eladash
cd6ef2958b
Add information about unnamed/main threads in logs and fatal dialog
...
* If thread is unnamed, keep log name empty for main thread, otherwise print thread id. In fatal dialog, main thread can be handled differently (with special remark that it's main thread).
* Always print thread id in fatal dialog, regardless of thread type.
Co-authored-by: Nekotekina <nekotekina@gmail.com>
2021-03-11 22:55:06 +03:00
Nekotekina
87af905018
Enable -Wunused-parameter
2021-03-06 18:07:08 +03:00
Nekotekina
038148bf06
Fix almost all GCC warnings
2021-02-17 22:59:04 +03:00
Nekotekina
ee288340b0
Implement thread_ctrl::scoped_priority
...
RAII priority control (+1, or -1)
2021-01-25 21:49:16 +03:00
Nekotekina
b7bf316c1a
Don't randomly include "stdafx.h"
...
It's file for precompiled headers.
Include what is used, don't rely on transitive includes.
2020-12-22 14:32:30 +03:00
Nekotekina
fb29933d3d
Add usz alias for std::size_t
2020-12-18 12:23:53 +03:00
Nekotekina
aa3aef4beb
std::chrono cleanup: always use steady_clock
2020-12-11 19:01:56 +03:00
Nekotekina
b16cc618b5
atomic.hpp: add some features and optimizations
...
Add atomic_t<>::observe() (relaxed load)
Add atomic_fence_XXX() (barrier functions)
Get rid of MFENCE instruction, replace with no-op LOCK OR on stack.
Remove <atomic> dependence from stdafx.h and relevant headers.
2020-12-07 17:13:12 +03:00
RipleyTom
af8c661a64
Remove BOM markers
2020-12-06 15:30:12 +03:00
Nekotekina
95dbcf2fd7
Logs: add callback for cpu_thread to set cpu_flag::wait
...
May improve waiting time in critical suspend_all ops.
2020-10-29 18:57:57 +03:00
Megamouse
fc3a134e7d
Emu: make "Silence All Logs" dynamic
2020-03-31 18:06:37 +02:00
Nekotekina
04dedb17eb
Disable exception handling.
...
Use -fno-exceptions in cmake.
On MSVC, enable _HAS_EXCEPTION=0.
Cleanup throw/catch from the source.
Create yaml.cpp enclave because it needs exception to work.
Disable thread_local optimizations in logs.cpp (TODO).
Implement cpu_counter for cpu_threads (moved globals).
2020-03-12 16:03:08 +03:00
Nekotekina
19107b2de5
logs.cpp: fix log format for backward compatibility
...
Don't add prefix for first messages.
2020-03-07 15:33:07 +03:00
Nekotekina
7599c66639
logs.cpp: print some errors if failed to create logs
2020-03-07 14:38:19 +03:00
Nekotekina
b726aa5a3e
logs.hpp: minor optimization for non-formatting logs
...
Also use single template with CharT to match fmt::format.
2020-03-07 13:52:51 +03:00
Nekotekina
12a3cdf0e8
Move Log.cpp to util/logs.cpp
...
Minor cleanup
2020-03-07 13:31:10 +03:00