Kelebek1
03de5e053d
Rework CoreTiming
4 years ago
Liam
83f1ecb73b
kernel: make current thread pointer thread local
4 years ago
Liam
808ad9eb9f
kernel: wait for threads to stop on pause
4 years ago
Liam
6d5cc6b2a2
kernel: fix some uses of disable_count
4 years ago
Liam
59a6d88625
kernel: implement KProcess suspension
4 years ago
Liam
f91e2f2742
kernel: fix passthrough of local captures in lambda
4 years ago
Liam
5772327b39
CpuManager: simplify pausing
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
german77
0a05a333e2
hidbus: Implement hidbus and ringcon
5 years ago
bunnei
11febb02d6
hle: kernel: Unify and integrate reference tracking for KServerPort/KServerSession.
- These are not managed elsewhere, and need to be tracked and closed on emulation shutdown.
4 years ago
Merry
de61c0897c
core/hle: Replace lock_guard with scoped_lock
4 years ago
lat9nq
53d3082dd4
kernel: Fix current_process race
TSan reported a race at :258 and :803, so make current_process an atomic
pointer.
4 years ago
bunnei
60f2fe3b48
hle: kernel: Create a default thread for services that do not need their own host thread.
4 years ago
ameerj
22e01068e1
core: Reduce unused includes
4 years ago
bunnei
8b109f8a69
core: hle: kernel: Allocate dummy threads on host thread storage.
- Fixes a crash where on subsequent boots, long-lived host threads would have their dummy threads freed.
4 years ago
bunnei
18baef2ec9
core: hle: kernel: Downgrade dangling objects warning to debug.
- It is not impossible to leak kernel objects, so this is not really any issue anymore (albeit, still interesting).
4 years ago
bunnei
58b39c8ad8
core: hle: kernel: Make object list container global and ensure it is reset on each emulation session.
4 years ago
bunnei
29924a999e
core: hle: kernel: Remove server session tracking.
- These are now allocated/managed by emulated memory, so we do not need to track and free them on shutdown.
4 years ago
bunnei
4b022badf0
core: hle: kernel: Update init_slab_heap, use device memory, and add KThreadLocalPage and KPageBuffer.
- Refreshes our slab initialization code to latest known behavior.
- Moves all guest kernel slabs into emulated device memory.
- Adds KThreadLocalPage and KPageBuffer, which we will use for accurate TLS management.
4 years ago
bunnei
82ca8230ad
hle: kernel: Re-create memory layout at initialization.
- As this can only be derived once.
4 years ago
bunnei
41c9c93736
hle: kernel: Remove unused pool locals.
4 years ago
bunnei
939707cf75
hle: kernel: k_memory_manager: Rework for latest kernel behavior.
- Updates the KMemoryManager implementation against latest documentation.
- Reworks KMemoryLayout to be accessed throughout the kernel.
- Fixes an issue with pool sizes being incorrectly reported.
4 years ago
bunnei
f2cc07cc2c
core: hle: kernel: Remove resource limit hack for PhysicalMemory.
- With prior changes, we now report the correct amount of physical memory available to the emulated process.
4 years ago
bunnei
8f2630de0a
hle: kernel: Remove redundant tracking of dummy threads.
- These are already tracked by kernel's registered_objects member.
4 years ago
bunnei
4148fde355
hle: kernel: k_memory_manager: Clear pages on allocation & free.
- Heap pages should be zero'd.
- Also explicitly passed along heap allocation option.
4 years ago
bunnei
b6bf119a43
core: hle: kernel: Instantiate a kernel instance of KWorkerTaskManager.
4 years ago
bunnei
fbab3dc017
hle: kernel: Fix service_threads access to be thread safe V2.
- PR #7699 attempted to fix CreateServiceThread and ReleaseServiceThread to be thread safe, but inadvertently introduced a possible dead-lock.
- With this PR, we use a worker thread to manage the service thread list, allowing it only to be accessed by a single thread, and guaranteeing threads will not destroy themselves.
- Fixes a rare crash in Pokemon Sword/Shield, I've now run this game for ~12 hours non-stop and am quite confident this is a good solution for this issue.
4 years ago
bunnei
ef9186172f
hle: kernel: Fix service_threads access to be thread safe.
- CreateServiceThread and ReleaseServiceThread can be accessed by different threads, uses a lock to make this thread safe.
- Fixes a rare crash in Pokemon Sword/Shield that can occur when a new service thread is being created while an old one is being destroyed.
4 years ago
ameerj
1fff9ea35e
kernel: Manually destroy the current process during shut down
Avoids a memory leak.
4 years ago
FernandoS27
8a38790bd3
hle: kernel: fix timing on thread preemption
4 years ago
bunnei
58da4d5a6e
hle: kernel: Add a flag for indicating that the kernel is currently shutting down.
4 years ago
bunnei
51a7f04b81
core: hle: kernel: DisableDispatch on suspend threads.
4 years ago
bunnei
3a83c9c027
core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.
4 years ago
bunnei
fa26f905c8
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
4 years ago
bunnei
cae0bef7ec
core: hle: kernel: Reflect non-emulated threads as core 3.
4 years ago
Adam Heinermann
fc017ead67
Fix crash on exit due to static scoped dummy threads
4 years ago
ameerj
d27abf5546
core: Remove unused includes
4 years ago
Feng Chen
60df1f9030
Fix dangling kernel objects when exiting
4 years ago
Feng Chen
301d0ac5e0
Revert PR7009
4 years ago
Feng Chen
c13d1e0b0f
Fix memory leak
4 years ago
bunnei
5e600cba3a
Revert "kernel: Various improvements to scheduler"
4 years ago
BreadFish64
8c4f818e77
kernel: Optimize GetHostThreadID
4 years ago
bunnei
0cd7bf70a3
core: hle: kernel: DisableDispatch on suspend threads.
4 years ago
bunnei
347e4d6ab8
core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.
4 years ago
bunnei
43fcb97ef3
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
4 years ago
bunnei
951143ba57
core: hle: kernel: Reflect non-emulated threads as core 3.
4 years ago
bunnei
beeed68944
hle: kernel: Track and release server sessions, and protect methods with locks.
5 years ago
bunnei
81d111fd1b
hle: kernel: Ensure current running process is closed.
5 years ago
bunnei
88350871df
hle: kernel: Ensure global handle table is finalized before closing.
5 years ago
bunnei
2c96cc5343
hle: kernel: Ensure global handle table is initialized.
5 years ago