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
Lioncash
63a3b54c1f
kernel: Resolve sign conversion warnings
Uncovered a bug within Thread's SetCoreAndAffinityMask() where an
unsigned variable (ideal_core) was being compared against "< 0", which
would always be a false condition.
We can also get rid of an unused function (GetNextProcessorId) which contained a sign
mismatch warning.
6 years ago
Lioncash
33df906815
scheduler: Mark parameter of AskForReselectionOrMarkRedundant() as const
This is only compared against, so it can be made const.
6 years ago
Lioncash
3dbc651296
scheduler: Initialize class members directly where applicable
Reduces the overall amount of code.
6 years ago
Lioncash
34e9a6ea64
scheduler: Amend documentation comments
Adjusts the formatting of a few of the comments an ensures they get
recognized as proper Doxygen comments.
6 years ago
Fernando Sahmkow
a88238d68d
Kernel: Address Feedback.
6 years ago
Fernando Sahmkow
17b53b4a54
Kernel Scheduler: Make sure the global scheduler shutdowns correctly.
6 years ago
Fernando Sahmkow
f2989c81d9
Scheduler: Corrections to YieldAndBalanceLoad and Yield bombing protection.
6 years ago
Fernando Sahmkow
68325300ae
Kernel: Initial implementation of thread preemption.
6 years ago
Fernando Sahmkow
acdce3b4df
Scheduler: Add protections for Yield bombing
In case of redundant yields, the scheduler will now idle the core for
it's timeslice, in order to avoid continuously yielding the same thing
over and over.
6 years ago
Fernando Sahmkow
5130168171
Kernel: Style and Corrections
7 years ago
Fernando Sahmkow
655ed87f53
Comment and reorganize the scheduler
7 years ago
Fernando Sahmkow
7a10ae0128
Implement a new Core Scheduler
7 years ago
Lioncash
7bbde5f645
kernel/scheduler: Remove unused parameter to AddThread()
This was made unused in 1913519836 , but
the parameter itself wasn't removed.
7 years ago
Fernando Sahmkow
19cec0236a
Use MultiLevelQueue instead of old ThreadQueueList
7 years ago
Lioncash
38dd80f70f
kernel/scheduler: Pass in system instance in constructor
Avoids directly relying on the global system instance and instead makes
an arbitrary system instance an explicit dependency on construction.
This also allows removing dependencies on some global accessor functions
as well.
7 years ago
Zach Hilman
5d50fa0824
scheduler: Only work steal higher priority threads from other cores
7 years ago
Zach Hilman
1a72e1681c
scheduler: Add explanations for YieldWith and WithoutLoadBalancing
7 years ago
Zach Hilman
b1c19bc88f
svc: Implement yield types 0 and -1
7 years ago
Lioncash
9bb7bc911f
svc: Implement svcGetInfo command 0xF0000002
This retrieves:
if (curr_thread == handle_thread) {
result = total_thread_ticks + (hardware_tick_count - last_context_switch_ticks);
} else if (curr_thread == handle_thread && sub_id == current_core_index) {
result = hardware_tick_count - last_context_switch_ticks;
}
7 years ago
Lioncash
4ebca28342
kernel/scheduler: Take ARM_Interface instance by reference in the constructor
It doesn't make sense to allow a scheduler to be constructed around a
null pointer.
7 years ago
Lioncash
e46ac56321
core: Namespace all code in the arm subdirectory under the Core namespace
Gets all of these types and interfaces out of the global namespace.
7 years ago
Lioncash
6082427cbd
scheduler: Make HaveReadyThreads() a const member function
This function doesn't modify instance state, so the const qualifier can
be added to it.
7 years ago
Lioncash
38c2af9330
kernel: Move object class to its own source files
General moving to keep kernel object types separate from the direct
kernel code. Also essentially a preliminary cleanup before eliminating
global kernel state in the kernel code.
8 years ago
Lioncash
3d2d454c36
kernel: Remove unnecessary includes
Removes unnecessary direct dependencies in some headers and also gets
rid of indirect dependencies that were being relied on to be included.
8 years ago
bunnei
eabfdfe4ec
scheduler: Protect scheduling functions with a global mutex.
8 years ago
bunnei
87335e8404
scheduler: Cleanup based on PR feedback.
8 years ago
bunnei
650f49fab2
kernel: Add Scheduler, which encapsulates the scheduling loading from Thread module.
8 years ago