Commit graph

101 commits

Author SHA1 Message Date
Eladash
d335d356ca IdManager.h: Savestate fix part 2 2023-10-05 05:07:46 +03:00
Eladash
96d31cf64e IdManager.h: Savestate fix 2023-10-02 15:38:58 +03:00
oltolm
0c94606fcf
Make compile with msvc, clang and gcc on Windows 2023-07-11 21:40:30 +03:00
Eladash
5f2f084091 Savestate/IDM: Do not save unsavable containers 2023-06-28 18:34:33 +03:00
Nekotekina
b49a1f27eb Warning fixes 2022-09-17 16:35:02 +03:00
Eladash
5e2424da58 IdManager.cpp: Fix cellFs IDs 2022-09-07 17:05:51 +03:00
Eladash
b55a052a22 IdManager.h: Do not lock IDM mutex if the preliminary ID check failed
Optimizes common ESRCH failures. (lambda variants only atm)
2022-08-07 20:23:54 +03:00
Eladash
72c14994f0 Savestates: Fix memory containers initialization (invalidates old savestates) 2022-07-05 08:25:36 +02:00
Elad Ashkenazi
fcd297ffb2
Savestates Support For PS3 Emulation (#10478) 2022-07-04 16:02:17 +03:00
Eladash
71e07dc6c7 IdManager.h: Improvements
* Ensure ::PtrSame<T, Derived> is true.
* Allow id_base, id_step and id_count to be of enumeration type.
* Fix potential deadlock in kernel explorer.

idm::select:
* Allow to select multiple inherited object types for idm::select.
* Allow function reference types. (they don't allow access to operator() directly, use deducing std::function constructor instead)
* Ensure ::is_same_ptr<T, object_type> is true.
2022-06-22 17:24:47 +03:00
Eladash
76bf720adf Improve emulation stopping speed
Split phases of signalling threads and joining them.
2021-06-08 18:26:14 +03:00
Nekotekina
160b131de3 types.hpp: implement smin, smax, amin, amax
Rewritten the following global utility constants:
`umax` returns max number, restricted to unsigned.
`smax` returns max signed number, restricted to integrals.
`smin` returns min signed number, restricted to signed.
`amin` returns smin or zero, less restricted.
`amax` returns smax or umax, less restricted.

Fix operators == and <=> for synthesized rel-ops.
2021-05-22 12:10:57 +03:00
Nekotekina
7dae376646 Implement fill_array() utility 2021-04-19 12:33:32 +03:00
Eladash
4a9be0a8d2 core: Move IDM to FXO 2021-04-04 17:29:32 +03:00
Nekotekina
d788b12a8e fixed_typemap.hpp: reduce indirection
Backported some changes from auto_typemap.hpp
Implemented methods init(), reset(), clear()
Disabled recreation support.
2021-03-02 16:08:14 +03:00
Nekotekina
b59f142d4e Move types.h to util/types.hpp 2020-12-12 15:12:01 +03:00
RipleyTom
af8c661a64 Remove BOM markers 2020-12-06 15:30:12 +03:00
Eladash
f0d526411c IDM: Implement idm::clear<typename> 2020-06-12 22:12:36 +03:00
Eladash
3265772ae4 idm: Implement creation/destruction invalidation counter
* "Ensures" newely created IDs won't have the same ID as old destroyed objects for lv2_obj. (256 tries cycle)

Similar to how the kernel implements it.
2020-05-24 19:24:07 +03:00
Eladash
141d62fbf9 Implement ::as_rvalue 2020-04-11 21:58:36 +03:00
Eladash
93b8f3b5db idm: Minor update to use std::static_pointer_cast 2020-04-11 10:58:24 +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
Eladash
1d4595a349 Idm: Minor assert fix 2020-02-15 10:41:15 +03:00
Nekotekina
c0f80cfe7a Use attributes for LIKELY/UNLIKELY
Remove LIKELY/UNLIKELY macro.
2020-02-05 10:42:34 +03:00
Nekotekina
465b16e786 Finally remove fxm from IdManager 2019-09-26 23:26:36 +03:00
msuih
5ac631e03b Fix debug build
Seems to be a compiler bug
2019-09-25 23:20:52 +03:00
Nekotekina
c900fb0d77 Delete g_idm
Needs to be reimplemented
2019-09-17 15:55:58 +03:00
Nekotekina
dd79a5efb7 Remove fxm::make_always 2019-08-27 03:50:15 +03:00
Nekotekina
fcbf91b7cb Deprecate fxm::get_always
And also its unused fxm::import_always counterpart
2019-08-27 03:50:15 +03:00
Nekotekina
8517ccfdfa Add new typemap for always existing objects
Not to be confused with singletons or global variables.
2019-08-22 02:13:39 +03:00
Eladash
96527eee5b idm: Fix bug in ID searching
* ID checking now checks if (id % step) == 0
* Extend possible ID range to allow UINT32_MAX (as long as base is non-zero)
2019-08-11 21:43:13 +03:00
gidan80
9aa08313e3 Qt: Add custom pad configs
Add a custom pad config for every game.
2019-05-16 20:37:41 +02: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
19a64e0e94 Add g_typemap and g_idm alias
Future idm/fxm replacement
2018-10-02 02:22:26 +03:00
Nekotekina
ee96807305 Remove explicit_bool_t, ignore, multicast<>
Remove vm::ptr operator %
This was a bad idea but explicit_bool_t was created almost for it
Other removed types are unused and have little to no meaning
2018-09-08 00:32:04 +03:00
Nekotekina
99ffc3fca9 Use std::invoke_result_t
Also simplify idm code
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
6cc7d1fb26 Use std::void_t 2018-08-24 16:44:19 +03:00
Nekotekina
4b6f8d2f62 fxm::check_unlocked added 2017-02-22 12:57:39 +03:00
Nekotekina
0674a58502 idm::check extended
idm::check_unlocked
idm::find_unlocked
idm::get_unlocked
2017-02-04 20:39:03 +03:00
Nekotekina
6433eebe1e IdManager fix 2017-01-31 15:57:32 +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
4203f53b67 IdManager bugfixed 2017-01-28 17:59:43 +03:00
Nekotekina
ee173dc3a2 IdManager fix 2017-01-26 04:22:15 +03:00
Nekotekina
591a6c8671 IdManager improved 2017-01-25 23:29:36 +03:00
Nekotekina
a06223b844 IdManager sugar 2017-01-25 04:43:12 +03:00
Nekotekina
1c14d872a8 New shared_mutex
Experimental sync utils
New semaphore<>
New cond_variable
New owned_mutex
2017-01-25 00:38:07 +03:00
Nekotekina
dbcb5df172 WRAP_EXPR macro removed 2016-08-15 17:11:45 +03:00
Nekotekina
0f87c4485d Silly macro removed-2 2016-08-14 18:19:42 +03:00
Nekotekina
7a2802a5e0 Silly macro removed 2016-08-12 19:31:28 +03:00