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
bunnei
a4b3202b65
hle: kernel: Provide methods for tracking dangling kernel objects.
5 years ago
Wunkolo
722f9c3cb5
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
bunnei
a3de201dcf
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
Markus Wick
9f92beed0a
Fix two GCC 11 warnings: Unneeded copies.
std::move created an unneeded copy.
iterating without reference also created copies.
5 years ago
bunnei
639baf88f7
hle: kernel: KSlabHeap: Allow host or guest allocations.
- Use host allocations for kernel memory, as this is not properly emulated yet.
- Use guest allocations for TLS, as this needs to be backed by DeviceMemory.
5 years ago
bunnei
777e7c52ba
hle: kernel: Implement named service ports using service interface factory.
- This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
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
14cb6883db
hle: kernel: Move slab resource counts to Kernel.
5 years ago
bunnei
89966df98c
hle: kernel: Fix un/sign mismatch errors with NUM_CPU_CORES.
5 years ago
bunnei
47224d3864
hle: kernel: Migrate to KHandleTable.
5 years ago
bunnei
95fbbf3041
hle: kernel: Improve MapSharedMemory and implement UnmapSharedMemory.
5 years ago
bunnei
ad048de3d6
hle: kernel: Rename Process to KProcess.
5 years ago
bunnei
90e23002fa
hle: kernel: Do not shutdown twice on emulator close.
5 years ago
bunnei
44c8d9206c
hle: kernel: Cleanup shutdown of persistent kernel objects.
5 years ago
bunnei
9f1abd8188
hle: kernel: Migrate KClientPort to KAutoObject.
5 years ago
bunnei
22a67a4627
hle: kernel: Migrate KResourceLimit to KAutoObject.
5 years ago
bunnei
a317bad4ce
hle: kernel: Move slab heaps to their own container.
5 years ago
bunnei
715978756e
hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.
5 years ago
bunnei
9f82c577d0
hle: kernel: Ensure all kernel objects with KAutoObject are properly created.
5 years ago
bunnei
986245ba10
hle: kernel: Use unique_ptr for suspend and dummy threads.
5 years ago
bunnei
11f9080d2e
hle: kernel: Migrate KSharedMemory to KAutoObject.
5 years ago
bunnei
7a6bfbde24
hle: kernel: Migrate KProcess to KAutoObject.
5 years ago