bunnei
cf3a05cf8c
hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.
6 years ago
bunnei
0b307a12f3
hle: kernel: k_scheduler: Use atomics for current_thread, etc.
6 years ago
bunnei
9b0a981710
hle: kernel: k_scheduler: Fix for single core mode.
6 years ago
bunnei
67d28075dd
kernel: Fix build errors.
6 years ago
bunnei
177b4da4e7
hle: kernel: KScheduler: Introduce thread context_guard.
6 years ago
bunnei
f34dd04d09
hle: kernel: Recode implementation of KThread to be more accurate.
6 years ago
bunnei
25cece3cea
kernel: svc_types: Add ThreadActivity.
6 years ago
bunnei
589ecb9a75
kernel: KSchedulerPriorityQueue: Lowest priority should be LowestThreadPriority.
6 years ago
bunnei
4440a59cb6
kernel: k_light_lock: Simplify EmuThreadHandle implementation.
6 years ago
bunnei
86206c81c2
hle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle implementation.
6 years ago
bunnei
eb3a02a3fd
core: hle: kernel: object: Implement Finalize() virtual method.
6 years ago
bunnei
3cefddbb47
core: hle: kernel: svc_results: Populate with several missing error codes.
6 years ago
bunnei
ddfa48d704
core: hle: kernel: Implement KLightLock.
6 years ago
bunnei
54620961fb
core: hle: kernel: Implement KThreadQueue.
6 years ago
bunnei
4ba9d6f969
hle: kernel: KThread: Clean up thread priorities.
6 years ago
bunnei
0ae0bc4340
hle: kernel: KThread: Reorganize thread priority defaults.
6 years ago
bunnei
eb396cd021
hle: kernel: KThread: Fix ThreadType definition.
6 years ago
bunnei
d49e29d866
hle: kernel: Move single core "phantom mode" out of KThread.
- This is a workaround that does not belong in a kernel primitive.
6 years ago
bunnei
e74f682506
hle: kernel: KThread: Remove thread types that do not exist.
6 years ago
bunnei
3d70b4a4ea
core: hle: kernel: Rename Thread to KThread.
6 years ago
Morph
afa0d5efb3
hle_ipc: Add Can(Read, Write)Buffer
Allows us to test whether a buffer can be read from or written to memory
6 years ago
Lioncash
d5bff783bd
common/bit_util: Replace CLZ/CTZ operations with standardized ones
Makes for less code that we need to maintain.
6 years ago
bunnei
e89be18c79
hle: kernel: thread: Preserve thread wait reason for debugging only.
- This is decoupled from core functionality and used for debugging only.
6 years ago
bunnei
42b25c1a2c
hle: kernel: k_scheduler_lock: Fix shadowing errors.
6 years ago
bunnei
e5cfd63ba4
core: hle: Integrate new KConditionVariable and KAddressArbiter implementations.
6 years ago
bunnei
8f3987d3df
core: hle: kernel: Update KAddressArbiter.
6 years ago
bunnei
75610701a3
core: hle: kernel: Update KConditionVariable.
6 years ago
bunnei
c37b0da7d0
core: hle: kernel: Begin moving common SVC defintions to its own header.
6 years ago
bunnei
02071333ca
hle: kernel: Remove unnecessary AddressArbiter definition.
6 years ago
bunnei
99a3953705
hle: kernel: k_scheduler: Cleanup OnThreadPriorityChanged.
6 years ago
bunnei
818ff3901a
hle: kernel: Rename thread "status" to "state".
6 years ago
bunnei
9744afa8b1
hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState.
- This is how the real kernel works, and is more accurate and simpler.
6 years ago
bunnei
d103a3656b
core: hle: kernel: Add some useful functions for checking kernel addresses.
6 years ago
bunnei
f3f7d42d63
core: hle: kernel: svc_types: Add type definitions for KAddressArbiter.
6 years ago
bunnei
2feb4d56e9
core: hle: kernel: Update KSynchronizationObject.
6 years ago
bunnei
eafd021b14
core: hle: kernel: Begin moving common SVC results to its own header.
6 years ago
ReinUsesLisp
64d9ef5e7a
core: Silence warnings when compiling without asserts
6 years ago
Morph
23413c0d44
general: Fix various spelling errors
6 years ago
ReinUsesLisp
8bfa4d6dbf
core/memory: Read and write page table atomically
Squash attributes into the pointer's integer, making them an uintptr_t
pair containing 2 bits at the bottom and then the pointer. These bits
are currently unused thanks to alignment requirements.
Configure Dynarmic to mask out these bits on pointer reads.
While we are at it, remove some unused attributes carried over from
Citra.
Read/Write and other hot functions use a two step unpacking process that
is less readable to stop MSVC from emitting an extra AND instruction in
the hot path:
mov rdi,rcx
shr rdx,0Ch
mov r8,qword ptr [rax+8]
mov rax,qword ptr [r8+rdx*8]
mov rdx,rax
-and al,3
and rdx,0FFFFFFFFFFFFFFFCh
je Core::Memory::Memory::Impl::Read<unsigned char>
mov rax,qword ptr [vaddr]
movzx eax,byte ptr [rdx+rax]
6 years ago
bunnei
236149a59b
hle: kernel: service_thread: Make thread naming more consistent.
6 years ago
bunnei
407d3b7374
hle: kernel: Manage service threads on another thread.
- This is to allow service threads to defer destruction of themselves.
6 years ago
bunnei
127bb064f7
hle: kernel: Manage host thread IDs using TLS.
- Avoids the need to have a large map of host to guest thread IDs.
6 years ago
comex
8be4bd5104
k_priority_queue: Fix concepts use
- For `std::same_as`, add missing include of `<concepts>`.
- For `std::convertible_to`, create a replacement in `common/concepts.h`
and use that instead.
This would also be found in `<concepts>`, but unlike `std::same_as`,
`std::convertible_to` is not yet implemented in libc++, LLVM's STL
implementation - not even in master. (In fact, `std::same_as` is the
*only* concept currently implemented. For some reason.)
6 years ago
comex
0049fbaa9e
Add missing include of "core/hle/kernel/kernel.h"
This is needed as the header invokes methods on KernelCore.
6 years ago
ameerj
ca41363261
svc: demote SleepThread log to LOG_TRACE
This log is called often, and introduces a lot of noise when debug logging is enabled, making it difficult to see other debug logs.
6 years ago
bunnei
67051cf10c
hle: kernel: Move ServiceThread ownership to KernelCore.
- Fixes a circular dependency which prevented threads from being released on shutdown.
6 years ago
bunnei
b2ef309edb
hle: kernel: service_thread: Add thread name and take weak_ptr of ServerSession.
6 years ago
bunnei
5d4fa58af2
core: hle: kernel: Clear process list on boot.
6 years ago
bunnei
838c266e82
core: kernel: Clear process list earlier.
6 years ago
bunnei
846f35c4ad
hle: kernel: hle_ipc: Remove SleepClientThread.
- This was kind of hacky, and no longer is necessary with service threads.
6 years ago