aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.cpp
AgeCommit message (Collapse)Author
2022-06-14kernel: implement KProcess suspensionLiam
2022-06-13kernel: fix passthrough of local captures in lambdaLiam
2022-06-08CpuManager: simplify pausingLiam
2022-04-23general: Convert source file copyright comments over to SPDXMorph
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.
2022-04-16hidbus: Implement hidbus and ringcongerman77
2022-04-12Merge pull request #8165 from bunnei/ensure-session-port-cleanupbunnei
Kernel: Track open references to KServerPort and KServerSession.
2022-04-11Merge pull request #8157 from lat9nq/kernel-racesbunnei
kernel: Fix some data races
2022-04-08hle: kernel: Unify and integrate reference tracking for ↵bunnei
KServerPort/KServerSession. - These are not managed elsewhere, and need to be tracked and closed on emulation shutdown.
2022-04-07core/hle: Replace lock_guard with scoped_lockMerry
2022-04-03kernel: Fix current_process racelat9nq
TSan reported a race at :258 and :803, so make current_process an atomic pointer.
2022-04-02hle: kernel: Create a default thread for services that do not need their own ↵bunnei
host thread.
2022-03-19core: Reduce unused includesameerj
2022-03-14core: hle: kernel: Allocate dummy threads on host thread storage.bunnei
- Fixes a crash where on subsequent boots, long-lived host threads would have their dummy threads freed.
2022-03-14core: hle: kernel: Downgrade dangling objects warning to debug.bunnei
- It is not impossible to leak kernel objects, so this is not really any issue anymore (albeit, still interesting).
2022-03-14core: hle: kernel: Make object list container global and ensure it is reset ↵bunnei
on each emulation session.
2022-03-14core: hle: kernel: Remove server session tracking.bunnei
- These are now allocated/managed by emulated memory, so we do not need to track and free them on shutdown.
2022-03-14core: hle: kernel: Update init_slab_heap, use device memory, and add ↵bunnei
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.
2022-02-27hle: kernel: Re-create memory layout at initialization.bunnei
- As this can only be derived once.
2022-02-27hle: kernel: Remove unused pool locals.bunnei
2022-02-27hle: kernel: k_memory_manager: Rework for latest kernel behavior.bunnei
- Updates the KMemoryManager implementation against latest documentation. - Reworks KMemoryLayout to be accessed throughout the kernel. - Fixes an issue with pool sizes being incorrectly reported.
2022-02-21core: hle: kernel: Remove resource limit hack for PhysicalMemory.bunnei
- With prior changes, we now report the correct amount of physical memory available to the emulated process.
2022-01-20hle: kernel: Remove redundant tracking of dummy threads.bunnei
- These are already tracked by kernel's registered_objects member.
2022-01-18Merge pull request #7701 from bunnei/clear-mem-pagesbunnei
Kernel Memory Updates (Part 3): Clear KMemoryManager pages & other fixes
2022-01-17Merge pull request #7712 from bunnei/fix-thread-exitbunnei
Accurately implement thread exit
2022-01-14hle: kernel: k_memory_manager: Clear pages on allocation & free.bunnei
- Heap pages should be zero'd. - Also explicitly passed along heap allocation option.
2022-01-14core: hle: kernel: Instantiate a kernel instance of KWorkerTaskManager.bunnei
2022-01-14hle: kernel: Fix service_threads access to be thread safe V2.bunnei
- 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.
2022-01-13hle: kernel: Fix service_threads access to be thread safe.bunnei
- 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.
2021-12-19kernel: Manually destroy the current process during shut downameerj
Avoids a memory leak.
2021-12-06hle: kernel: fix timing on thread preemptionFernandoS27
2021-12-06hle: kernel: Add a flag for indicating that the kernel is currently shutting ↵bunnei
down.
2021-12-06core: hle: kernel: DisableDispatch on suspend threads.bunnei
2021-12-06core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.bunnei
2021-12-06core: hle: kernel: Ensure idle threads are closed before destroying scheduler.bunnei
2021-12-06core: hle: kernel: Reflect non-emulated threads as core 3.bunnei
2021-11-17Fix crash on exit due to static scoped dummy threadsAdam Heinermann
2021-11-03core: Remove unused includesameerj
2021-10-27Fix dangling kernel objects when exitingFeng Chen
2021-10-27Revert PR7009Feng Chen
2021-10-27Fix memory leakFeng Chen
2021-08-25Revert "kernel: Various improvements to scheduler"bunnei
2021-08-24Merge pull request #6878 from BreadFish64/optimize-GetHostThreadIDAmeer J
kernel: Optimize GetHostThreadID
2021-08-16kernel: Optimize GetHostThreadIDBreadFish64
2021-08-07core: hle: kernel: DisableDispatch on suspend threads.bunnei
2021-08-07core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.bunnei
2021-08-07core: hle: kernel: Ensure idle threads are closed before destroying scheduler.bunnei
2021-08-07core: hle: kernel: Reflect non-emulated threads as core 3.bunnei
2021-07-20hle: kernel: Track and release server sessions, and protect methods with locks.bunnei
2021-07-20hle: kernel: Ensure current running process is closed.bunnei
2021-07-20hle: kernel: Ensure global handle table is finalized before closing.bunnei