1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 18:53:28 +01:00
Commit Graph

171 Commits

Author SHA1 Message Date
kd-11
7e3b8b5cdb c++-ify empty return 2024-09-04 07:49:49 +03:00
kd-11
a60eab6e36 aarch64: Fix compilation for windows-on-arm 2024-09-04 07:49:49 +03:00
Elad Ashkenazi
1bd4565186 Implement thread_ctrl::wait_until() 2024-08-17 06:38:49 +03:00
Megamouse
25ce3880c4 Replace get_thread_class with static cast for performance reasons 2024-05-18 16:16:08 +02:00
Megamouse
dfee5b9a6c threads: replace magic number id_type with thread_class 2024-05-18 16:16:08 +02:00
Eladash
b83e39a540 Fix some warnings 2024-05-04 14:15:51 +03:00
Eladash
213a19c9f3 Add logging for CallFromMainThread 2024-03-24 16:19:06 +02:00
Megamouse
cdfe3ee7c8 Name some threads 2024-01-31 16:33:29 +01:00
kd-11
6a7fb4c10c Do not include profiling headers 2023-12-23 14:24:34 +02:00
Eladash
0c410f8a14 Postpone thread launching on g_fxo->init 2023-12-19 15:34:07 +02:00
Eladash
b4fc43d787 PPU LLVM: Re-add multi-threaded overlay module compilation 2023-09-10 18:58:34 +03:00
Ivan Chikish
d34287b2cc Linux: use futex_waitv syscall for atomic waiting
In order to make this possible, some unnecessary features were removed.
2023-08-02 21:46:06 +03:00
Eladash
3d8d9ef61c Threads.cpp: Fix infinite looping 2023-06-02 08:54:46 +03:00
Eladash
daf43989fc Thread.h: Improve thread abort performance 2022-08-25 23:54:56 +03:00
Eladash
506b9deec5 Savestates/SPU LLVM: Improve saving performance 2022-08-25 23:54:56 +03:00
Eladash
cf0fcf5a2a SPU: Implement execution wake-up delay 2022-06-28 19:54:25 +03:00
Eladash
3dda72e47f SPU: Cache reservation memory direct access handle (optimization) 2022-05-04 20:28:55 +03:00
Nekotekina
580bd2b25e Initial Linux Aarch64 support
* Update asmjit dependency (aarch64 branch)
* Disable USE_DISCORD_RPC by default
* Dump some JIT objects in rpcs3 cache dir
* Add SIGILL handler for all platforms
* Fix resetting zeroing denormals in thread pool
* Refactor most v128:: utils into global gv_** functions
* Refactor PPU interpreter (incomplete), remove "precise"
* - Instruction specializations with multiple accuracy flags
* - Adjust calling convention for speed
* - Removed precise/fast setting, replaced with static
* - Started refactoring interpreters for building at runtime JIT
*   (I got tired of poor compiler optimizations)
* - Expose some accuracy settings (SAT, NJ, VNAN, FPCC)
* - Add exec_bytes PPU thread variable (akin to cycle count)
* PPU LLVM: fix VCTUXS+VCTSXS instruction NaN results
* SPU interpreter: remove "precise" for now (extremely non-portable)
* - As with PPU, settings changed to static/dynamic for interpreters.
* - Precise options will be implemented later
* Fix termination after fatal error dialog
2022-01-15 06:48:04 +03:00
Megamouse
f72d148d37 Fix config mode reset 2021-10-05 20:16:11 +02:00
Eladash
98e40d12ef sys_ppu: Implement sys_ppu_thread_rename 2021-07-19 12:37:33 +02:00
Eladash
0aed00a758
Improve thread aborting mechanism (#10490)
Call pseudo-virtual operator=(thread_state) of thread context.
2021-06-27 11:43:48 +03:00
Eladash
4f76211551 Hotfix #10411 2021-06-08 20:12:32 +03:00
Eladash
76bf720adf Improve emulation stopping speed
Split phases of signalling threads and joining them.
2021-06-08 18:26:14 +03:00
Eladash
daa53b77cf Simplify named_thread construction 2021-05-01 18:08:03 +03:00
Nekotekina
61450335a5 named_thread: use concepts, improve constructors
Better default thread name detection.
2021-04-21 17:19:53 +03:00
Nekotekina
0c9c481cee Use requires syntax in more places
Change style in some places.
2021-04-19 16:51:40 +03:00
Megamouse
a16d8ba3ea More random changes 2021-04-11 14:01:51 +03:00
Nekotekina
3609eb25c9 Implement thread_ctrl::is_main() 2021-03-06 23:10:31 +03:00
Nekotekina
55c75d2c87 Implement thread_ctrl::get_tid() 2021-03-06 23:10:31 +03:00
Nekotekina
bbf52f3cea named_thread: fix bugs in std::forward usage
Fix few misused threads and other bugs.
2021-03-02 16:08:14 +03:00
Nekotekina
de9d859f4a named_thread: implement task queue
atomic_ptr: implement push_head()

thread_ctrl::state() triggers task queue execution.
2021-02-28 20:20:17 +03:00
Nekotekina
3aaa0172d5 named_thread: implement "default" event loop
Fixup "sleepy" thread at startup on Windows.
Permit threads which lack operator()() overload.
2021-02-28 20:16:13 +03:00
Nekotekina
29e7eda887 named_thread: rewrite result_storage
Use SFINAE as permitted by std::invoke_result_t<>
2021-02-28 20:16:13 +03:00
Nekotekina
ee288340b0 Implement thread_ctrl::scoped_priority
RAII priority control (+1, or -1)
2021-01-25 21:49:16 +03:00
Eladash
12e1be2626 Implement thread_ctrl::wait_on (see #9208) 2021-01-21 18:31:51 +03:00
RipleyTom
bef2c50b03 Remove bom in Utilities dir 2020-12-25 10:07:40 +03:00
Nekotekina
fb29933d3d Add usz alias for std::size_t 2020-12-18 12:23:53 +03:00
Nekotekina
6b3f722ff0 Hotfix: useless error 2020-12-16 11:57:29 +03:00
Nekotekina
b59f142d4e Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00
Nekotekina
b382d3b3e9 Remove ASSUME macro
It's dangerous and sometimes bluntly misused feature.
Its optimization potential is near-zero.
2020-12-10 14:08:02 +03:00
Nekotekina
36c8654fb8 Remove HERE macro
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina
b5d498ffda Homebrew atomic_ptr rewritten (util/shared_ptr.hpp)
It's analogous to C++20 atomic std::shared_ptr

The following things brought into global namespace:
single_ptr
shared_ptr
atomic_ptr
make_single
2020-11-26 20:11:26 +03:00
Nekotekina
d4c17ecda5 Simplify communication with thread pool
Add "entry_point" member to "thread_base".
Don't use "m_thread" to exchange values.
2020-11-23 11:32:34 +03:00
Nekotekina
71f1021648 Fix thread pool entry point and get_cycles()
Fix possible race between thread handle availability.
Don't treat zero thread as invalid one.
Now entry point is full is assembly.
Attempt to fix #9282
Also fix some TLS.
2020-11-21 17:18:42 +03:00
Nekotekina
d789250976 Add thread_ctrl::get_thread_stack
Returns addr and size of current thread's stack.
2020-11-17 05:33:46 +03:00
Nekotekina
badb3dc2dd atomic.cpp/threads: remove old wait callback
Add new wait callback which simply collects statistics.
Shift workarounds towards actual problem detection.
2020-11-14 18:16:27 +03:00
Nekotekina
0c7f9458c0 Fix thread pool resource management.
Make sure no tail call happens (change ret address to a trampoline).
Make sure thread handles don't leak if the pool is full.
2020-11-13 17:17:45 +03:00
Nekotekina
ab365fe494 Fixed thread pool a bit
Use 128-bit allocator instead of queue.
When pool is full (128), threads just terminate as before.
2020-11-13 13:32:44 +03:00
Nekotekina
67785a918c Implement simple thread pool 2020-11-13 03:32:24 +03:00
Megamouse
a3eb5c2d63 More Header cleanup 2020-11-06 22:14:05 +01:00