summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/scheduler.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* kernel/scheduler: Pass in system instance in constructorLioncash2019-03-041-7/+7
| | | | | | | | 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.
* core_timing: Convert core timing into a classLioncash2019-02-161-1/+1
| | | | | | | | | | | Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
* core_timing: Rename CoreTiming namespace to Core::TimingLioncash2019-02-121-1/+1
| | | | | | Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
* scheduler: Avoid manual Reschedule callZach Hilman2018-12-041-10/+8
| | | This will automatically occur anyway when PrepareReschedule is called
* scheduler: Only work steal higher priority threads from other coresZach Hilman2018-12-031-21/+17
|
* svc: Avoid performance-degrading unnecessary rescheduleZach Hilman2018-12-021-1/+2
|
* scheduler: Add explanations for YieldWith and WithoutLoadBalancingZach Hilman2018-11-221-4/+57
|
* svc: Implement yield types 0 and -1Zach Hilman2018-11-191-0/+18
|
* svc: Implement svcGetInfo command 0xF0000002Lioncash2018-10-261-3/+25
| | | | | | | | | | 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; }
* kernel/thread: Use a regular pointer for the owner/current processLioncash2018-10-101-4/+4
| | | | | | | | | | | There's no real need to use a shared pointer in these cases, and only makes object management more fragile in terms of how easy it would be to introduce cycles. Instead, just do the simple thing of using a regular pointer. Much of this is just a hold-over from citra anyways. It also doesn't make sense from a behavioral point of view for a process' thread to prolong the lifetime of the process itself (the process is supposed to own the thread, not the other way around).
* kernel/thread: Make all instance variables privateLioncash2018-10-041-18/+18
| | | | | | | | | | | | | | | | | | | | Many of the member variables of the thread class aren't even used outside of the class itself, so there's no need to make those variables public. This change follows in the steps of the previous changes that made other kernel types' members private. The main motivation behind this is that the Thread class will likely change in the future as emulation becomes more accurate, and letting random bits of the emulator access data members of the Thread class directly makes it a pain to shuffle around and/or modify internals. Having all data members public like this also makes it difficult to reason about certain bits of behavior without first verifying what parts of the core actually use them. Everything being public also generally follows the tendency for changes to be introduced in completely different translation units that would otherwise be better introduced as an addition to the Thread class' public interface.
* kernel/process: Make data member variables privateLioncash2018-09-301-1/+1
| | | | | | | Makes the public interface consistent in terms of how accesses are done on a process object. It also makes it slightly nicer to reason about the logic of the process class, as we don't want to expose everything to external code.
* kernel/scheduler: Take ARM_Interface instance by reference in the constructorLioncash2018-09-251-7/+7
| | | | | It doesn't make sense to allow a scheduler to be constructed around a null pointer.
* core: Namespace all code in the arm subdirectory under the Core namespaceLioncash2018-08-251-1/+1
| | | | Gets all of these types and interfaces out of the global namespace.
* scheduler: Make HaveReadyThreads() a const member functionLioncash2018-08-121-1/+1
| | | | | This function doesn't modify instance state, so the const qualifier can be added to it.
* kernel: Remove unnecessary includesLioncash2018-07-311-0/+4
| | | | | Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
* Merge pull request #751 from Subv/tpidr_el0bunnei2018-07-211-0/+3
|\ | | | | CPU: Save and restore the TPIDR_EL0 system register on every context switch
| * CPU: Save and restore the TPIDR_EL0 system register on every context switch.Subv2018-07-211-0/+3
| | | | | | | | Note that there's currently a dynarmic bug preventing this register from being written.
* | thread: Convert ThreadStatus into an enum classLioncash2018-07-201-8/+8
|/ | | | | Makes the thread status strongly typed, so implicit conversions can't happen. It also makes it easier to catch mistakes at compile time.
* core/memory, core/hle/kernel: Use std::move where applicableLioncash2018-07-191-1/+3
| | | | Avoids pointless copies
* scheduler: Clear exclusive state when switching contextsMerryMage2018-07-161-0/+1
|
* Rename logging macro back to LOG_*James Rowe2018-07-031-3/+3
|
* scheduler: Protect scheduling functions with a global mutex.bunnei2018-05-111-0/+15
|
* kernel: Migrate logging macros to fmt-compatible onesLioncash2018-04-261-3/+3
|
* core: Move process creation out of global state.bunnei2018-03-141-3/+4
|
* scheduler: Cleanup based on PR feedback.bunnei2018-02-191-1/+1
|
* kernel: Add Scheduler, which encapsulates the scheduling loading from Thread module.bunnei2018-02-181-0/+134