aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/scheduler.h
AgeCommit message (Collapse)Author
2020-12-06hle: kernel: Rewrite scheduler implementation based on Mesopshere.bunnei
2020-11-29kernel: scheduler: Minor cleanup to remove duplicated code.bunnei
2020-09-11Merge pull request #4323 from ReinUsesLisp/no-spinbunnei
kernel/scheduler: Use std::mutex instead of spin lock
2020-08-14kernel/scheduler: Mark SchedulerLock constructor as nodiscardLioncash
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.
2020-07-12kernel/scheduler: Use std::mutex instead of spin lockReinUsesLisp
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.
2020-06-27Core/Common: Address Feedback.Fernando Sahmkow
2020-06-27Kernel: Correct Host Context on Threads and Scheduler.Fernando Sahmkow
2020-06-27SingleCore: Improve Cycle timing Behavior and replace mutex in global ↵Fernando Sahmkow
scheduler for spinlock.
2020-06-27CPU_Manager: Unload/Reload threads on preemption on SingleCoreFernando Sahmkow
2020-06-27Kernel: Fixes, corrections and asserts to scheduler and different svcs.Fernando Sahmkow
2020-06-27Scheduler: Release old thread fiber before trying to switch to the next ↵Fernando Sahmkow
thread fiber.
2020-06-27Kernel: Corrections to Scheduling.Fernando Sahmkow
2020-06-27General: Add AssertsFernando Sahmkow
2020-06-27SVC: Correct SendSyncRequest.Fernando Sahmkow
2020-06-27General: Recover Prometheus project from harddrive failure Fernando Sahmkow
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.
2020-03-02core: Implement separate A32/A64 ARM interfaces.bunnei
2020-02-22Kernel: Address Feedback.Fernando Sahmkow
2020-02-22Kernel: Implement Scheduler locksFernando Sahmkow
2020-02-22Kernel: Make global scheduler depend on KernelCoreFernando Sahmkow
2020-02-11Core: Set all hardware emulation constants in a single file.Fernando Sahmkow
2019-12-07kernel: Remove unnecessary includesLioncash
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.
2019-11-24kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for ↵bunnei
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.
2019-11-12kernel: Resolve sign conversion warningsLioncash
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.
2019-10-27scheduler: Mark parameter of AskForReselectionOrMarkRedundant() as constLioncash
This is only compared against, so it can be made const.
2019-10-27scheduler: Initialize class members directly where applicableLioncash
Reduces the overall amount of code.
2019-10-27scheduler: Amend documentation commentsLioncash
Adjusts the formatting of a few of the comments an ensures they get recognized as proper Doxygen comments.
2019-10-15Kernel: Address Feedback.Fernando Sahmkow
2019-10-15Kernel Scheduler: Make sure the global scheduler shutdowns correctly.Fernando Sahmkow
2019-10-15Scheduler: Corrections to YieldAndBalanceLoad and Yield bombing protection.Fernando Sahmkow
2019-10-15Kernel: Initial implementation of thread preemption.Fernando Sahmkow
2019-10-15Scheduler: Add protections for Yield bombingFernando Sahmkow
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.
2019-10-15Kernel: Style and CorrectionsFernando Sahmkow
2019-10-15Comment and reorganize the schedulerFernando Sahmkow
2019-10-15Implement a new Core SchedulerFernando Sahmkow
2019-03-30kernel/scheduler: Remove unused parameter to AddThread()Lioncash
This was made unused in b404fcdf1443b91ac9994c05ad1fe039fcd9675e, but the parameter itself wasn't removed.
2019-03-27Use MultiLevelQueue instead of old ThreadQueueListFernando Sahmkow
2019-03-04kernel/scheduler: Pass in system instance in constructorLioncash
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.
2018-12-03scheduler: Only work steal higher priority threads from other coresZach Hilman
2018-11-22scheduler: Add explanations for YieldWith and WithoutLoadBalancingZach Hilman
2018-11-18svc: Implement yield types 0 and -1Zach Hilman
2018-10-26svc: Implement svcGetInfo command 0xF0000002Lioncash
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; }
2018-09-25kernel/scheduler: Take ARM_Interface instance by reference in the constructorLioncash
It doesn't make sense to allow a scheduler to be constructed around a null pointer.
2018-08-24core: Namespace all code in the arm subdirectory under the Core namespaceLioncash
Gets all of these types and interfaces out of the global namespace.
2018-08-12scheduler: Make HaveReadyThreads() a const member functionLioncash
This function doesn't modify instance state, so the const qualifier can be added to it.
2018-08-01kernel: Move object class to its own source filesLioncash
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.
2018-07-31kernel: Remove unnecessary includesLioncash
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
2018-05-10scheduler: Protect scheduling functions with a global mutex.bunnei
2018-02-19scheduler: Cleanup based on PR feedback.bunnei
2018-02-18kernel: Add Scheduler, which encapsulates the scheduling loading from Thread ↵bunnei
module.