Liam
61ef65ab25
cpu_manager: properly check idle on return from preemption
4 years ago
Liam
83f1ecb73b
kernel: make current thread pointer thread local
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
bunnei
fa26f905c8
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
4 years ago
Fernando Sahmkow
69b1cad803
SVC: Implement svcInfo:IdleTickCount
Used by the Witcher 3
4 years ago
ameerj
d7977be416
general: Update style to clang-format-12
4 years ago
bunnei
5e600cba3a
Revert "kernel: Various improvements to scheduler"
4 years ago
bunnei
43fcb97ef3
core: hle: kernel: Ensure idle threads are closed before destroying scheduler.
4 years ago
Lioncash
eeae5217ba
core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
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
4149670ee8
fixup! hle: kernel: Rename Process to KProcess.
5 years ago
bunnei
ad048de3d6
hle: kernel: Rename Process to KProcess.
5 years ago
bunnei
715978756e
hle: kernel: Refactor several threads/events/sharedmemory to use slab heaps.
5 years ago
bunnei
773580b9f7
hle: kernel: Migrate idle threads.
5 years ago
Lioncash
a875393fdb
Amend bizarre clang-format suggestions
5 years ago
Lioncash
cd6ea98890
k_scheduler: Mark KScopedSchedulerLock as [[nodiscard]]
Prevents logic bugs like:
KScopedSchedulerLock{kernel};
instead of:
KScopedSchedulerLock lk{kernel};
from slipping through.
5 years ago
bunnei
0aac780e5d
hle: kernel: Migrate some code from Common::SpinLock to KSpinLock.
5 years ago
bunnei
845a217d5e
Revert "core: Switch to unique_ptr for usage of Common::Fiber."
5 years ago
bunnei
3322f10f84
core: Switch to unique_ptr for usage of Common::Fiber.
- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context.
- Fixes a memory leak due to circular reference of the shared pointer.
5 years ago
bunnei
cf3a05cf8c
hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.
5 years ago
bunnei
0b307a12f3
hle: kernel: k_scheduler: Use atomics for current_thread, etc.
5 years ago
bunnei
f34dd04d09
hle: kernel: Recode implementation of KThread to be more accurate.
5 years ago
bunnei
3d70b4a4ea
core: hle: kernel: Rename Thread to KThread.
5 years ago
bunnei
99a3953705
hle: kernel: k_scheduler: Cleanup OnThreadPriorityChanged.
5 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.
5 years ago
bunnei
2033f0a1a3
hle: kernel: KScheduler: Various style fixes based on code review feedback.
5 years ago
bunnei
de522657dd
hle: kernel: Migrate to KScopedSchedulerLock.
5 years ago
bunnei
61e017a026
hle: kernel: Separate KScopedSchedulerLockAndSleep from k_scheduler.
5 years ago
bunnei
4f16c961c9
hle: kernel: Separate KScheduler from GlobalSchedulerContext class.
5 years ago
bunnei
039844bbb9
hle: kernel: Rewrite scheduler implementation based on Mesopshere.
5 years ago
bunnei
3edaafa295
kernel: scheduler: Minor cleanup to remove duplicated code.
5 years ago
Lioncash
8d7e58562f
kernel/scheduler: Mark SchedulerLock constructor as nodiscard
Allows the compiler to warn about cases where the constructor is used
but then immediately discarded, which is a potential cause of
locking/unlocking bugs.
5 years ago
ReinUsesLisp
43e15338e2
kernel/scheduler: Use std::mutex instead of spin lock
Profiling shows that this is a highly contested mutex, causing dimishing
results compared to a OS lock. std::mutex implementations can spin for a
while before falling back to an OS lock.
This avoids wasting precious CPU cycles in a no-op.
6 years ago
Fernando Sahmkow
94a51e6b21
Core/Common: Address Feedback.
6 years ago
Fernando Sahmkow
555c4c238c
Kernel: Correct Host Context on Threads and Scheduler.
6 years ago
Fernando Sahmkow
4132ba96da
SingleCore: Improve Cycle timing Behavior and replace mutex in global scheduler for spinlock.
6 years ago
Fernando Sahmkow
ebb640e968
CPU_Manager: Unload/Reload threads on preemption on SingleCore
6 years ago
Fernando Sahmkow
24bc1f020a
Kernel: Fixes, corrections and asserts to scheduler and different svcs.
6 years ago
Fernando Sahmkow
8c30c20863
Scheduler: Release old thread fiber before trying to switch to the next thread fiber.
6 years ago
Fernando Sahmkow
47c01e68da
Kernel: Corrections to Scheduling.
6 years ago
Fernando Sahmkow
cd3d1798d8
General: Add Asserts
6 years ago
Fernando Sahmkow
85ca7b2bdb
SVC: Correct SendSyncRequest.
6 years ago
Fernando Sahmkow
7ee76003ad
General: Recover Prometheus project from harddrive failure
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host
Timing, Reworks the Kernel's Scheduler, Introduce Idle State and
Suspended State, Recreates the bootmanager, Initializes Multicore
system.
6 years ago
bunnei
048ac77adc
core: Implement separate A32/A64 ARM interfaces.
6 years ago
Fernando Sahmkow
78f01601d0
Kernel: Address Feedback.
6 years ago
Fernando Sahmkow
7c2b72bcef
Kernel: Implement Scheduler locks
6 years ago
Fernando Sahmkow
f5da504663
Kernel: Make global scheduler depend on KernelCore
6 years ago
Fernando Sahmkow
6fc0790f3a
Core: Set all hardware emulation constants in a single file.
6 years ago
Lioncash
7953f7b0d8
kernel: Remove unnecessary includes
Over the course of the changes to the kernel code, a few includes are no
longer necessary, particularly with the change over to std::shared_ptr
from Boost's intrusive_ptr.
6 years ago
bunnei
5cb0f276fe
kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. ( #3154 )
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects.
- See https://github.com/citra-emu/citra/pull/4710 for details.
6 years ago