Nekotekina
36c8654fb8
Remove HERE macro
...
Some cleanup.
Add location to some functions.
2020-12-10 12:30:22 +03:00
Nekotekina
e055d16b2c
Replace verify() with ensure() with auto src location.
...
Expression ensure(x) returns x.
Using comma operator removed.
2020-12-09 15:43:38 +03:00
RipleyTom
af8c661a64
Remove BOM markers
2020-12-06 15:30:12 +03:00
Nekotekina
34fa010601
Improve cond_var notifiers
...
But nobody uses it anyway, so clean up includes.
2020-11-06 00:10:16 +03:00
Eladash
17f965c171
lv2: Minor fix of "unspecific ppu" path of _sys_lwcond_signal
2020-08-03 02:57:20 +03:00
Eladash
d9750e8f9f
SPU/PPU reservations: Optimizations for reservation locks and check_state() (non-TSX)
2020-07-09 03:17:35 +01:00
Eladash
5fda9a4efb
sus_lwcond_signal_all: use protocol specified in lwmutex
...
Trying to fix a nearly impossible corner case.
2020-06-15 17:08:57 +03:00
Eladash
37ce7056ac
lv2: Minor optimization for "awake all" threads in sleep queue
2020-05-04 01:10:19 +03:00
Eladash
fdd7f0645d
Some typos ( #7908 )
...
* sys_lwcond: replace writer lock with reader lock
* sys_rsx: Typo fix
* sys_net: Fixup for buffer reading
2020-03-31 16:44:50 +03:00
Eladash
66bd8308d9
lv2: Wait for rescheduling before confirming timeouts ( #7875 )
2020-03-28 03:16:59 +00:00
Eladash
3de41bfea7
_sys_lwcond_signal: Make mode 3 respect ordering of the sleep queue
2020-03-23 21:37:37 +03:00
Eladash
cccc32fa9d
sys_lwmutex/lwcond: track lwcond waiters ( #7826 )
...
In lwmutex destroy syscall, wait for pending waiters.
2020-03-23 10:30:17 +03:00
Eladash
7be35315da
Fix lv2 sys_lwcond/sys_lwmutex kernel explorer names
2020-03-19 06:45:14 +03:00
Eladash
03a6d67c6c
Log sys_lwmutex/sys_lwcond names as strings
...
Use std::string_view instead of creating a temporary NTS string when reading object name.
2020-03-17 18:22:13 +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
Nekotekina
b3f5d6d85b
Put lv2_obj::awake calls under mutex
2019-08-29 02:44:12 +03:00
Nekotekina
fd839243ec
Revert PR 6405
2019-08-27 14:05:38 +03:00
Eladash
a921fe3351
lv2: Wait for rescheduling before confirming ETIMEOUT
2019-08-27 03:44:34 +03:00
Nekotekina
dd86aa472d
Fix _sys_lwcond_queue_wait
...
Fixup after #5883
2019-08-18 00:19:31 +03:00
Nekotekina
6535fb0603
Fix _sys_lwcond_signal_all
...
Fixup after #5883
2019-08-18 00:19:31 +03:00
eladash
050339bb3e
PPU/LV2: Make thread-lists scheduling atomic
2019-08-17 22:46:36 +03:00
eladash
e40b76b253
sys_lwcond: Extract protocol from lwmutex at creation
...
This is the only reason theres a need to specify lwmutex_sq id at creation. unlike sys_cond, lwcond isn't connected to lwmutex at the lv2 level.
SYS_SYNC_RETRY fix is done explicitly at the firmware level.
This fixes issues when the original lwcond and lwmutexol data got corrupted or deallocated, this can happen when the program simply memcpy the control data to somewhere else.
Or if it uses direct lv2 the lwcond conrol param can even be NULL which will make it access violate when dereferncing it. (This param is unchecked and can be anything)
2019-07-29 21:58:04 +03:00
Eladash
85b1152e29
Timers scaling and fixes
2019-07-23 00:09:01 +01: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
Nekotekina
517a2bc34a
sys_lwcond: add vm::temporary_unlock
2019-06-20 14:46:32 +03:00
elad
f272a5f779
sys_lwmutex fixup after #5680
...
sys_lwcond_wait unlocks always with the 'usual' unlocking flags
2019-03-08 23:44:46 +03:00
elad
63a9421634
Fix race in sys_lwcond_wait on error code
2019-02-16 21:41:59 +03:00
eladash
d6995f40c7
Fixup for sys_lwcond_signal_x error checking
2019-02-11 01:13:29 +03:00
eladash
0861226271
Make more use of the new atomic_t<>::release
2019-02-10 00:16:57 +03:00
eladash
3fd17e43a3
lv2: Fix lwcond_queue_wait lock acquiring
2018-11-07 13:06:29 +03:00
eladash
3faaf9e7fb
lv2: Fix lwmutex locking
2018-11-07 13:06:29 +03:00
eladash
777f36e604
Fix error code checking of sys_lwcond_signal_x
2018-11-07 13:06:29 +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
fb5cdf9769
atomic_t<>: extend fetch_op to support cancellation
...
Use std::invoke inside atomic_op/fetch_op
Remove op_fetch because it's easily replaced
Add fetch_dec_sat algorithm (conditional decrement)
2018-09-08 00:32:04 +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
Nekotekina
bf14cbdb27
Fix _sys_lwcond_signal, _sys_lwcond_signal_all
2017-07-30 01:09:42 +03:00
Nekotekina
88fef183a3
config.yml: Log section optimized
2017-05-15 14:37:05 +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
11b0b6958f
sys_spu diag
2017-02-05 15:48:11 +03:00
Nekotekina
3d85a89cc9
sys_lwcond, sys_lwmutex
2017-02-04 20:39:03 +03:00
Nekotekina
b21fce4d6f
IdManager improved
...
lv2_obj for kernel objects
Simple lookup (vector)
Another idm API refactoring
2017-01-29 21:37:04 +03:00
Nekotekina
a5a2d43d7c
Thread.cpp refinement
...
Hide thread mutex
Safe notify() method
Other refactoring
2017-01-29 19:52:19 +03:00
Nekotekina
05fb57baff
VERIFY macro removed
2016-08-15 03:13:31 +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