Liam
d0e11c27d9
kernel: prefer std::addressof
3 years ago
Liam
cf0b407daa
kernel: remove kernel_
3 years ago
Liam
832e1e2ca4
kernel: use GetCurrentProcess
3 years ago
Liam
683a0a1a71
Ensure correctness of atomic store ordering
3 years ago
Liam
3980952ab8
kernel: refactor dummy thread wakeups
3 years ago
Liam
dbb1312876
kernel: Ensure all uses of disable_count are balanced
4 years ago
Liam
e2be660909
kernel: be more careful about initialization path for HLE threads
4 years ago
Liam
21e2063d7d
kernel: fix single-core preemption points
4 years ago
Liam
61b26b386d
kernel: fix issues with single core mode
4 years ago
Liam
e47bced65d
kernel: use KScheduler from mesosphere
4 years ago
Liam
e551960935
common/fiber: make fibers easier to use
4 years ago
Liam
83f1ecb73b
kernel: make current thread pointer thread local
4 years ago
Liam
8d2abc710c
core/debugger: memory breakpoint support
4 years ago
Liam
6d5cc6b2a2
kernel: fix some uses of disable_count
4 years ago
Morph
2b87305d31
general: Convert source file copyright comments over to SPDX
This formats all copyright comments according to SPDX formatting guidelines.
Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
4 years ago
bunnei
e1b3368c18
hle: kernel: Use std::mutex instead of spin locks for most kernel locking.
4 years ago
ameerj
22e01068e1
core: Reduce unused includes
4 years ago
bunnei
1b8ed3a76d
hle: kernel: KScheduler: Fix deadlock with core waiting for a thread lock that has migrated.
- Previously, it was possible for a thread migration to occur from core A to core B.
- Next, core B waits on a guest lock that must be released by a thread queued for core A.
- Meanwhile, core A is still waiting on the core B's current thread lock - resulting in a deadlock.
- Fix this by try-locking the thread lock.
- Fixes softlocks in FF8 and Pokemon Legends Arceus.
4 years ago
bunnei
b3f8d2491d
hle: kernel: KThread: Ensure host (dummy) threads block on locking.
- But do not enter the priority queue, as otherwise they will be scheduled.
- Allows dummy threads to use guest synchronization primitives.
4 years ago
bunnei
668af26696
hle: kernel: KThread: Decrease DummyThread priority to ensure it is never scheduled.
4 years ago
bunnei
f1e06f984d
hle: kernel: KScheduler: Ensure dummy threads are never scheduled.
- These are only used by host threads for locking.
4 years ago
Valeri
01852ee857
hle: remove no-op code
Found by static analysis with PVS-Studio. Nobody seems to really know what was it doing there.
4 years ago
bunnei
b12695ddc4
core: hle: kernel: Implement thread pinning.
- We largely had the mechanics in place for thread pinning, this change hooks these up.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_thread_pinning.cpp .
4 years ago
bunnei
5788e077cd
hle: kernel k_scheduler: EnableScheduling: Remove redundant GetCurrentThreadPointer calls.
4 years ago
FernandoS27
2a7b4489a0
hle: kernel: fix scheduling ops from HLE host thread.
4 years ago
bunnei
58da4d5a6e
hle: kernel: Add a flag for indicating that the kernel is currently shutting down.
4 years ago
bunnei
d31fc39e05
core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling.
5 years ago
bunnei
1e03387d98
core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess.
5 years ago
bunnei
454970983d
core: hle: kernel: k_scheduler: Improve ScheduleImpl.
5 years ago
bunnei
90310b9c03
core: hle: kernel: k_scheduler: Improve Unload.
5 years ago
bunnei
fa26f905c8
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
5 years ago
bunnei
5e600cba3a
Revert "kernel: Various improvements to scheduler"
5 years ago
bunnei
19457823ea
core: hle: kernel: k_scheduler: Improve DisableScheduling and EnableScheduling.
5 years ago
bunnei
aedc599224
core: hle: kernel: k_scheduler: Remove unnecessary MakeCurrentProcess.
5 years ago
bunnei
edba87b96d
core: hle: kernel: k_scheduler: Improve ScheduleImpl.
5 years ago
bunnei
0d22a55e01
core: hle: kernel: k_scheduler: Improve Unload.
5 years ago
bunnei
43fcb97ef3
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
5 years ago
Markus Wick
c9f9e77be3
core/arm_interface: Call SVC after end of dynarmic block.
So we can modify all of dynarmic states within SVC without ExceptionalExit.
Especially as the ExceptionalExit hack is dropped on upstream dynarmic.
5 years ago
Lioncash
eeae5217ba
core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
5 years ago
Lioncash
e019da0487
kernel: Eliminate variable shadowing
Now that the large kernel refactor is merged, we can eliminate the
remaining variable shadowing cases.
5 years ago
bunnei
ad048de3d6
hle: kernel: Rename Process to KProcess.
5 years ago
bunnei
715978756e
hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.
5 years ago
bunnei
2cb4c9d7b2
hle: kernel: Move slab heap management to KernelCore.
5 years ago
bunnei
9f82c577d0
hle: kernel: Ensure all kernel objects with KAutoObject are properly created.
5 years ago
bunnei
773580b9f7
hle: kernel: Migrate idle threads.
5 years ago
bunnei
0aac780e5d
hle: kernel: Migrate some code from Common::SpinLock to KSpinLock.
5 years ago
bunnei
e4b692bd16
common: Fiber: use a reference for YieldTo.
- Fixes another small leak.
5 years ago
bunnei
75519d107f
hle: kernel: KThread: Rework dummy threads & fix memory leak.
- Dummy threads are created on thread local storage for all host threads.
- Fixes a leak by removing creation of fibers, which are not applicable here.
5 years ago
bunnei
845a217d5e
Revert "core: Switch to unique_ptr for usage of Common::Fiber."
5 years ago
bunnei
3322f10f84
core: Switch to unique_ptr for usage of Common::Fiber.
- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context.
- Fixes a memory leak due to circular reference of the shared pointer.
5 years ago