bunnei
6e953f7f02
hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.
5 years ago
bunnei
37f74d8741
hle: kernel: k_scheduler: Use atomics for current_thread, etc.
5 years ago
bunnei
f6b10fad63
hle: kernel: k_scheduler: Fix for single core mode.
5 years ago
bunnei
0a1449e04b
kernel: Fix build errors.
5 years ago
bunnei
ca78f77827
hle: kernel: KScheduler: Introduce thread context_guard.
5 years ago
bunnei
cdd14b03e5
hle: kernel: Recode implementation of KThread to be more accurate.
5 years ago
bunnei
1470338458
kernel: svc_types: Add ThreadActivity.
5 years ago
bunnei
1772ebeb1e
kernel: KSchedulerPriorityQueue: Lowest priority should be LowestThreadPriority.
5 years ago
bunnei
1f99f5473c
kernel: k_light_lock: Simplify EmuThreadHandle implementation.
5 years ago
bunnei
c0f5830323
hle: kernel: TimeManager: Simplify to not rely on previous EmuThreadHandle implementation.
5 years ago
bunnei
ff186b2498
core: hle: kernel: object: Implement Finalize() virtual method.
5 years ago
bunnei
33b4930280
core: hle: kernel: svc_results: Populate with several missing error codes.
5 years ago
bunnei
5a4fc4a529
core: hle: kernel: Implement KLightLock.
5 years ago
bunnei
97129bc742
core: hle: kernel: Implement KThreadQueue.
5 years ago
bunnei
4dbf3f4880
hle: kernel: KThread: Clean up thread priorities.
5 years ago
bunnei
1e55498110
hle: kernel: KThread: Reorganize thread priority defaults.
5 years ago
bunnei
0530292b97
hle: kernel: KThread: Fix ThreadType definition.
5 years ago
bunnei
4782985013
hle: kernel: Move single core "phantom mode" out of KThread.
- This is a workaround that does not belong in a kernel primitive.
5 years ago
bunnei
eea346ba8e
hle: kernel: KThread: Remove thread types that do not exist.
5 years ago
bunnei
c0d3aef28c
core: hle: kernel: Rename Thread to KThread.
5 years ago
Morph
008afa5d59
hle_ipc: Add Can(Read, Write)Buffer
Allows us to test whether a buffer can be read from or written to memory
5 years ago
Lioncash
8620de6b20
common/bit_util: Replace CLZ/CTZ operations with standardized ones
Makes for less code that we need to maintain.
5 years ago
bunnei
03dfc8d8e7
hle: kernel: thread: Preserve thread wait reason for debugging only.
- This is decoupled from core functionality and used for debugging only.
5 years ago
bunnei
6b2f653143
hle: kernel: k_scheduler_lock: Fix shadowing errors.
5 years ago
bunnei
912dd50146
core: hle: Integrate new KConditionVariable and KAddressArbiter implementations.
5 years ago
bunnei
952d1ac487
core: hle: kernel: Update KAddressArbiter.
5 years ago
bunnei
b4e6d6c385
core: hle: kernel: Update KConditionVariable.
5 years ago
bunnei
1212fa60b6
core: hle: kernel: Begin moving common SVC defintions to its own header.
5 years ago
bunnei
8a155c4058
hle: kernel: Remove unnecessary AddressArbiter definition.
5 years ago
bunnei
f12701b303
hle: kernel: k_scheduler: Cleanup OnThreadPriorityChanged.
5 years ago
bunnei
d1309fb275
hle: kernel: Rename thread "status" to "state".
5 years ago
bunnei
c3c43e32fc
hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState.
- This is how the real kernel works, and is more accurate and simpler.
5 years ago
bunnei
7420a717e6
core: hle: kernel: Add some useful functions for checking kernel addresses.
5 years ago
bunnei
4bbf173fc1
core: hle: kernel: svc_types: Add type definitions for KAddressArbiter.
5 years ago
bunnei
35c3c078e3
core: hle: kernel: Update KSynchronizationObject.
5 years ago
bunnei
1ae883435d
core: hle: kernel: Begin moving common SVC results to its own header.
5 years ago
ReinUsesLisp
4f13e270c8
core: Silence warnings when compiling without asserts
5 years ago
Morph
a745d87971
general: Fix various spelling errors
5 years ago
ReinUsesLisp
b3587102d1
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]
5 years ago
bunnei
82e0eeed21
hle: kernel: service_thread: Make thread naming more consistent.
5 years ago
bunnei
a2a0f5318d
hle: kernel: Manage service threads on another thread.
- This is to allow service threads to defer destruction of themselves.
5 years ago
bunnei
c192da3f82
hle: kernel: Manage host thread IDs using TLS.
- Avoids the need to have a large map of host to guest thread IDs.
5 years ago
comex
388cf58b31
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.)
5 years ago
comex
b36896b90e
Add missing include of "core/hle/kernel/kernel.h"
This is needed as the header invokes methods on KernelCore.
5 years ago
ameerj
0383363a8f
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.
5 years ago
bunnei
dfdac7d38a
hle: kernel: Move ServiceThread ownership to KernelCore.
- Fixes a circular dependency which prevented threads from being released on shutdown.
5 years ago
bunnei
f57be2e626
hle: kernel: service_thread: Add thread name and take weak_ptr of ServerSession.
5 years ago
bunnei
d0649d0971
core: hle: kernel: Clear process list on boot.
5 years ago
bunnei
6d2f9428c5
core: kernel: Clear process list earlier.
5 years ago
bunnei
5d4715cc6a
hle: kernel: hle_ipc: Remove SleepClientThread.
- This was kind of hacky, and no longer is necessary with service threads.
5 years ago