Eladash
dc5cdb3bb4
sys_ppu_thread: reduce global memory stats after thread creation
2020-04-05 15:23:09 +03:00
Eladash
b11e8f8b8d
Minor fix of sys_ppu_thread_yield return value
...
Account for a special case where threads were rotated but no context
switch was made.
2020-03-19 06:45:14 +03:00
Eladash
664d606123
Add return value of sys_ppu_thread_yield
2020-03-17 18:22:13 +03:00
Nekotekina
45389dca51
PPU: minor fix for ppu_join_status::max
...
Don't treat it as special "invalid" value.
2020-03-14 20:36:56 +03:00
Eladash
efe6e1eb0a
sys_ppu_thread: Make PPU id removal after exit atomic with descheduling
...
* Make PPU id removal after exit atomic with descheduling
* Make joining thread scheduling atomic with thread exit sleep.
* Update sys_ppu_thread_stop/restart.
* Add idm::remove_verify.
2020-03-14 18:30:14 +02:00
Nekotekina
bd234a7668
sys_ppu: another fixup
2020-03-02 10:35:54 +03:00
Nekotekina
c7fa4e2375
Fixup
2020-03-01 22:40:48 +03:00
Nekotekina
6ee9153329
sys_ppu_thread: fixing detached threads
2020-03-01 22:29:03 +03:00
Nekotekina
b05b16aedc
sys_ppu: Hotfix for detached threads
2020-03-01 18:30:16 +03:00
Nekotekina
490f58ff3c
Try to purge thread_state::detached
...
It's rarely necessary, but can cause unexpected problems.
2020-02-28 21:11:13 +03:00
Nekotekina
65eeee0f4c
Remove cancerous lf_value<>
...
Replace thread names (generic, PPU, SPU) with new shared pointers.
Devirtualize cpu_thread::get_name (used in single case).
2020-02-28 18:54:46 +03:00
Nekotekina
92e3eaf3ff
Fix signed-unsigned comparisons and mark warning as error (part 2).
2020-02-19 22:54:58 +03:00
Megamouse
fe75311be2
move config structs to own files and clean up some headers
2020-02-17 15:08:17 +03:00
Eladash
7ae679adbe
Fix logging of ppu name in sys_ppu_thread_create/rename
2020-01-26 20:32:10 +00:00
Eladash
9d15083c61
Fix sys_ppu_thread_create/rename thread name range
2020-01-18 18:46:13 +03:00
Eladash
4c20881f8f
Fixup after #6933 ( #7166 )
...
* fixup
* Get rid of obsolute arg in lv2_obj::awake
* nvm ill do this later
* Typo fix of the decade
2020-01-01 17:38:05 +00:00
Eladash
71c4a2a15f
Silence some log messages
2019-12-31 22:27:27 +03:00
Eladash
c2eb9a583d
Implement ps3 application root flags detection
2019-12-31 22:22:06 +03:00
Nekotekina
a85a8796d3
Use g_fxo for page_fault_event_entries
2019-08-22 02:13:39 +03:00
eladash
050339bb3e
PPU/LV2: Make thread-lists scheduling atomic
2019-08-17 22:46:36 +03:00
Eladash
0d88f037ff
Add new accuracy control for PUTLLUC accuracy setting (non-TSX)
...
With the option enabled GET commands are blocked until the current PUTLLC/PUTLLUC executer on that address finishes
Additional improvements:
- Minor race fix of sys_ppu_thread_exit (wait until the writer finishes)
- Max number of ppu threads bumped to 8
2019-08-17 00:42:46 +03:00
Eladash
cd4e895c04
Use error_code in mmapper_thread_recover_page_fault
2019-08-13 04:56:00 +03:00
Eladash
cbcd06d1dc
ppu: Stack size allocation improvements
2019-08-11 21:43:13 +03:00
eladash
7508ae6e65
Add EAGAIN check for sys_memory_contianer_create
2019-07-29 21:55:59 +03:00
Lassi Hämäläinen
c963c51a60
Remove unnecessary header includes
...
- Manually removed lot of unneeded #includes to clean code and reduce
compilation time
- Reordered some of the #includes to be in more logical order
2019-06-25 17:11:10 +03:00
TGEnigma
38cc92ec45
Add _sys_ppu_thread_create and sys_ppu_thread_rename error checks
2019-04-11 18:14:05 +03:00
eladash
4a28319edf
Implement SPU page faults notifications
...
* Implement both RawSPU and threaded SPU page fault recovery
* Guard page_fault_notification_entries access with a mutex
* Add missing lock in sys_ppu_thread_recover_page_fault/get_page_fault_context
* Fix EINVAL check in sys_ppu_thread_recover_page_fault, previously when the event was not found begin() was erased and
CELL_OK was returned.
* Fixed page fault recovery waiting logic:
- Do not rely on a single thread_ctrl notification (unsafe)
- Avoided a race where ::awake(ppu) can be called before ::sleep(ppu) therefore nop-ing out the notification
* Avoid inconsistencies with vm flags on page fault cause detection
* Fix sys_mmapper_enable_page_fault_notification EBUSY check
from RE it's allowed to register the same queue twice (on a different area) but not to enable page fault notifications twice
2019-03-12 13:28:31 +03:00
eladash
84d42ecb65
Add EFAULT checks to spu_thread_group_join, ppu_thread_join
...
Order of checks is based on firmware
2019-02-10 00:16:57 +03:00
eladash
56b7581ade
Return error code in sys_ppu_thread_get_join_state
2019-01-25 18:04:33 +03:00
eladash
3332a10052
ppu: Fix threads scheduler
...
*Set priority under a lock
*Fix yield command making threads going out of scheduler control by removing it from the queue (not a bug that affects compatibility)
2018-11-07 13:06:29 +03:00
eladash
d14c8a03b3
typo fix
2018-10-20 22:27:48 +03:00
Nekotekina
1b37e775be
Migration to named_thread<>
...
Add atomic_t<>::try_dec instead of fetch_dec_sat
Add atomic_t<>::try_inc
GDBDebugServer is broken (needs rewrite)
Removed old_thread class (former named_thread)
Removed storing/rethrowing exceptions from thread
Emu.Stop doesn't inject an exception anymore
task_stack helper class removed
thread_base simplified (no shared_from_this)
thread_ctrl::spawn simplified (creates detached thread)
Implemented overrideable thread detaching logic
Disabled cellAdec, cellDmux, cellFsAio
SPUThread renamed to spu_thread
RawSPUThread removed, spu_thread used instead
Disabled deriving from ppu_thread
Partial support for thread renaming
lv2_timer... simplified, screw it
idm/fxm: butchered support for on_stop/on_init
vm: improved allocation structure (added size)
2018-10-19 22:22:35 +03:00
Nekotekina
ca5158a03e
Cleanup semaphore<> (sema.h) and mutex.h (shared_mutex)
...
Remove semaphore_lock and writer_lock classes, replace with std::lock_guard
Change semaphore<> interface to Lockable (+ exotic try_unlock method)
2018-09-03 23:00:36 +03:00
Nekotekina
363811981d
Reintroduce LOG_CHANNEL
...
Groundwork for further improvements
2018-08-25 15:39:00 +03:00
eladash
f349695a75
Rsx: rewrite address translation
2018-08-13 16:16:34 +03:00
Nekotekina
cce0ad0c35
Clean vm::ps3 namespace use
2018-02-09 17:49:37 +03:00
Inviuz
cc0d7c5985
improved hack/fix for cellsurmixer
2018-01-24 15:21:24 +00:00
Robbie
47b121a700
PPU Page Faults ( #3309 )
...
I guess I'll merge it and fix some issues later myself.
2017-10-08 23:37:54 +03:00
Nekotekina
d0b37777c3
Remove throw cpu_flag
2017-06-23 20:09:33 +03:00
Nekotekina
88fef183a3
config.yml: Log section optimized
2017-05-15 14:37:05 +03:00
Nekotekina
4ceaab10a5
_mxr000 hack moved
2017-04-16 17:44:20 +03:00
Nekotekina
4739eb3601
Reservation fix
2017-03-11 15:48:43 +03:00
Nekotekina
9000407a77
cpu_thread::test_state added
...
lv2_obj::sleep adjustment
synchronization fixes
2017-02-22 13:23:21 +03:00
Nekotekina
598c90f376
PPU thread scheduler
2017-02-13 22:26:11 +03:00
Nekotekina
dc7ac22f84
sys_ppu
...
LV2_LOCK removal
error_code introduction
2017-01-31 18:03:09 +03:00
Nekotekina
a5a2d43d7c
Thread.cpp refinement
...
Hide thread mutex
Safe notify() method
Other refactoring
2017-01-29 19:52:19 +03:00
Nekotekina
df6607e236
Minor fixes
2017-01-28 03:21:11 +03:00
Nekotekina
fc56e70172
vm::ptr<char> formatting
2016-08-11 16:47:20 +03:00
Nekotekina
bdeccd889f
cpu_type removed, system_type added
...
cpu_state -> cpu_flag
vm::stack_allocator template improved
ppu_cmd type changed to enum, cmd64 type added
2016-08-09 17:14:41 +03:00
Nekotekina
46735d6b3d
New bitsets (experimental)
2016-08-08 16:29:37 +03:00