Morph
e29f3b87f1
style: Remove extra space preceding the :: operator
5 years ago
Feng Chen
5fbfc4c19e
Fix KShareMemory object leak
5 years ago
Feng Chen
7cd43b139a
Fix KScopedAutoObject object leak when SendSyncRequest
5 years ago
ameerj
73666fb262
general: Update style to clang-format-12
5 years ago
Morph
6f307f1521
kernel: Add missing <functional> include
5 years ago
bunnei
0c8594b225
Revert "kernel: Various improvements to scheduler"
5 years ago
Valeri
0b3d12be40
Fix check is thread current in GetThreadContext
Misplaced break made it only check for the first core.
5 years ago
BreadFish64
14e93f133a
kernel: Optimize GetHostThreadID
5 years ago
bunnei
aef0ca6f0d
core: hle: kernel: Disable dispatch count tracking on single core.
- This would have limited value, and would be a mess to handle properly.
5 years ago
bunnei
5060a97210
core: hle: kernel: k_thread: Mark KScopedDisableDispatch as nodiscard.
5 years ago
bunnei
48a3496b93
core: hle: kernel: k_auto_object: Add GetName method.
- Useful purely for debugging.
5 years ago
bunnei
5051d3c415
core: hle: kernel: DisableDispatch on suspend threads.
5 years ago
bunnei
1798c3b6b0
core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling.
5 years ago
bunnei
2dfb07388a
core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.
5 years ago
bunnei
d1c502720d
core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess.
5 years ago
bunnei
77ad64b97d
core: hle: kernel: k_scheduler: Improve ScheduleImpl.
5 years ago
bunnei
bedcf19710
core: hle: kernel: k_scheduler: Improve Unload.
5 years ago
bunnei
7569d6774d
core: hle: kernel: k_process: DisableDispatch on main thread.
5 years ago
bunnei
f2b0d28983
core: hle: kernel: k_handle_table: Use KScopedDisableDispatch as necessary.
5 years ago
bunnei
01af2f4162
core: hle: kernel: k_thread: Add KScopedDisableDispatch.
5 years ago
bunnei
2b9560428b
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
5 years ago
bunnei
68eee94875
core: hle: kernel: Reflect non-emulated threads as core 3.
5 years ago
bunnei
f3db3dcc8d
hle: kernel: svc: Remove part of ExitProcess.
- ExitProcess is not actually implemented either way, and this needs more work before we implement.
5 years ago
bunnei
52caa52cc2
hle: kernel: Track and release server sessions, and protect methods with locks.
5 years ago
bunnei
8d755147d8
hle: kernel: KProcess: Change process termination assert to a warning.
- Since we do not implement multiprocess right now, this should not be a crashing assert.
5 years ago
bunnei
854c7a3c28
hle: kernel: Ensure current running process is closed.
5 years ago
bunnei
ecf3653444
hle: kernel: Ensure global handle table is finalized before closing.
5 years ago
bunnei
24540e0ad9
kernel: svc: ConnectToNamedPort: Close extra reference to port.
5 years ago
bunnei
b119363fc2
hle: kernel: k_process: Close the handle table on shutdown.
5 years ago
bunnei
6020723e77
hle: kernel: k_process: Close main thread reference after it is inserted into handle table.
5 years ago
bunnei
fe402d3506
hle: kernel: Ensure global handle table is initialized.
5 years ago
bunnei
929994132a
hle: kernel: Provide methods for tracking dangling kernel objects.
5 years ago
Wunkolo
4569f39c7c
common: Replace common_sizes into user-literals
Removes common_sizes.h in favor of having `_KiB`, `_MiB`, `_GiB`, etc
user-literals within literals.h.
To keep the global namespace clean, users will have to use:
```
using namespace Common::Literals;
```
to access these literals.
5 years ago
Morph
1a5eceeb9c
kernel: Fix missing peak set in KResourceLimit::SetLimitValue
5 years ago
Morph
ebd38d66db
kernel: Unconditionally set thread state when appropriate
5 years ago
Morph
aa79ca7a7a
kernel: KLightConditionVariable: Update implementation to 12.x
Updates the implementation of KLightConditionVariable to FW 12.x
5 years ago
bunnei
b259e95c09
hle: kernel: KClientPort: Add an assert for session count.
- Prevents us from over decrementing num_sessions.
5 years ago
bunnei
ec5674a6ad
hle: service: sm: Fix GetService setup of session & port.
5 years ago
bunnei
b2971b48ed
hle: kernel: KServerSession: Fix client disconnected.
- Prevents a cloned session's handler from being overwritten by another disconnected session.
- Fixes session handler nullptr asserts with Pokemon Sword & Shield.
5 years ago
bunnei
c63ea608aa
kernel: svc: Add missing error check to CancelSynchronization.
- Avoids a potential crash if the handle is invalid, and also makes this code accurate to real kernel behavior.
5 years ago
bunnei
b8fb9b3f11
hle: kernel: KServerSession: Work-around scenario where session is closed too early.
5 years ago
bunnei
08d798b6fe
hle: kernel: hle_ipc: Ensure SessionRequestHandler is valid.
5 years ago
bunnei
a493ab2678
hle: kernel: Remove service thread manager and use weak_ptr.
- We no longer need to queue up service threads to be destroyed.
- Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield.
5 years ago
bunnei
9db569b2d9
hle: kernel: KServerSession: Use ASSERT_MSG where appropriate.
5 years ago
bunnei
ada4242c01
hle: kernel: k_server_session: Return service thread by strong pointer.
5 years ago
bunnei
93f93cb8bc
hle: kernel: k_server_session: Ensure service thread is valid before dereference.
5 years ago
bunnei
384cbe3829
hle: kernel: hle_ipc: Use default destructor for SessionRequestManager.
5 years ago
bunnei
6119836795
hle: kernel: KAutoObjectWithListContainer: Use boost::instrusive::rbtree.
- Fixes some crashes introduced by our common intrusive red/black tree impl.
5 years ago
bunnei
27ce97fd42
hle: kernel: Refactor to allocate a ServiceThread per service handler.
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject.
- This results in race conditions with N sessions queuing requests to the same service interface.
- Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347 .
5 years ago
Morph
a0e4c2e1fc
general: Replace RESULT_UNKNOWN with ResultUnknown
Transition to PascalCase for result names.
5 years ago