Fernando Sahmkow
47c01e68da
Kernel: Corrections to Scheduling.
2020-06-27 11:35:23 -04:00
Fernando Sahmkow
cd3d1798d8
General: Add Asserts
2020-06-27 11:35:21 -04:00
Fernando Sahmkow
78eeea9f17
General: Add better safety for JIT use.
2020-06-27 11:35:20 -04:00
Fernando Sahmkow
6605f8acfa
SVC: Correct WaitSynchronization, WaitProcessWideKey, SignalProcessWideKey.
2020-06-27 11:35:17 -04:00
Fernando Sahmkow
85ca7b2bdb
SVC: Correct SendSyncRequest.
2020-06-27 11:35:14 -04:00
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.
2020-06-27 11:35:06 -04:00
bunnei
048ac77adc
core: Implement separate A32/A64 ARM interfaces.
2020-03-02 21:51:57 -05:00
Fernando Sahmkow
d0b12c793d
Scheduler: Inline global scheduler in Scheduler Lock.
2020-02-22 12:39:17 -04:00
Fernando Sahmkow
d6584d988f
Kernel: Correct pending feedback.
2020-02-22 11:51:03 -04:00
Fernando Sahmkow
78f01601d0
Kernel: Address Feedback.
2020-02-22 11:18:07 -04:00
Fernando Sahmkow
7c2b72bcef
Kernel: Implement Scheduler locks
2020-02-22 11:18:07 -04:00
Fernando Sahmkow
f5da504663
Kernel: Make global scheduler depend on KernelCore
2020-02-22 11:18:06 -04:00
Fernando Sahmkow
0d2a459fae
Core: Address Feedback
2020-02-13 19:10:33 -04:00
Fernando Sahmkow
6fc0790f3a
Core: Set all hardware emulation constants in a single file.
2020-02-11 20:19:11 -04:00
Fernando Sahmkow
0a5e0d4777
Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.
...
This commit instends on better naming the new purpose of this classes.
2020-01-26 14:07:22 -04:00
Fernando Sahmkow
2624ac7ae8
CpuCore: Clear exclusive state after doing a run in dynarmic.
...
This commit corrects an error in which a Core could remain with an
exclusive state after running, leaving space for possible race
conditions between changing cores.
2019-12-05 18:08:59 -04:00
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.
2019-11-24 20:15:51 -05:00
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.
2019-11-12 07:55:39 -05:00
Lioncash
33df906815
scheduler: Mark parameter of AskForReselectionOrMarkRedundant() as const
...
This is only compared against, so it can be made const.
2019-10-27 23:35:50 -04:00
Lioncash
0ae1dedad7
scheduler: Silence sign conversion warnings
2019-10-27 22:44:52 -04:00
Lioncash
3dbc651296
scheduler: Initialize class members directly where applicable
...
Reduces the overall amount of code.
2019-10-27 22:13:55 -04:00
Lioncash
34e9a6ea64
scheduler: Amend documentation comments
...
Adjusts the formatting of a few of the comments an ensures they get
recognized as proper Doxygen comments.
2019-10-27 22:12:32 -04:00
Fernando Sahmkow
5acd086b18
Kernel: Clang Format
2019-10-15 11:55:27 -04:00
Fernando Sahmkow
a88238d68d
Kernel: Address Feedback.
2019-10-15 11:55:25 -04:00
Fernando Sahmkow
17b53b4a54
Kernel Scheduler: Make sure the global scheduler shutdowns correctly.
2019-10-15 11:55:24 -04:00
Fernando Sahmkow
3c9e26a003
Kernel: Clang Format
2019-10-15 11:55:17 -04:00
Fernando Sahmkow
abc8856e2c
Kernel: Remove global system accessor from WaitObject
2019-10-15 11:55:16 -04:00
Fernando Sahmkow
7d04b271a6
Scheduler: Implement Yield Count and Core migration on Thread Preemption.
2019-10-15 11:55:16 -04:00
Fernando Sahmkow
f2989c81d9
Scheduler: Corrections to YieldAndBalanceLoad and Yield bombing protection.
2019-10-15 11:55:15 -04:00
Fernando Sahmkow
68325300ae
Kernel: Initial implementation of thread preemption.
2019-10-15 11:55:14 -04:00
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.
2019-10-15 11:55:13 -04:00
Fernando Sahmkow
5130168171
Kernel: Style and Corrections
2019-10-15 11:55:12 -04:00
Fernando Sahmkow
655ed87f53
Comment and reorganize the scheduler
2019-10-15 11:55:11 -04:00
Fernando Sahmkow
7a10ae0128
Implement a new Core Scheduler
2019-10-15 11:55:04 -04:00
Lioncash
6a929c3a2c
kernel: Handle page table switching within MakeCurrentProcess()
...
Centralizes the page table switching to one spot, rather than making
calling code deal with it everywhere.
2019-04-07 01:12:54 -04:00
Lioncash
7bbde5f645
kernel/scheduler: Remove unused parameter to AddThread()
...
This was made unused in 1913519836
, but
the parameter itself wasn't removed.
2019-03-30 05:29:33 -04:00
Lioncash
27c96604cf
kernel/scheduler: Use deduction guides on mutex locks
...
Since C++17, we no longer need to explicitly specify the type of the
mutex within the lock_guard. The type system can now deduce these with
deduction guides.
2019-03-30 05:28:43 -04:00
Fernando Sahmkow
1e7fd04059
Fixes and corrections on formatting.
2019-03-27 14:49:43 -04:00
Fernando Sahmkow
19cec0236a
Use MultiLevelQueue instead of old ThreadQueueList
2019-03-27 14:34:32 -04:00
bunnei
5840ce2950
core: Move PageTable struct into Common.
2019-03-16 22:05:40 -04:00
Lioncash
cfb327a85b
kernel/thread: Migrate WaitCurrentThread_Sleep into the Thread interface
...
Rather than make a global accessor for this sort of thing. We can make
it a part of the thread interface itself. This allows getting rid of a
hidden global accessor in the kernel code.
2019-03-15 23:58:31 -04:00
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.
2019-03-04 17:01:37 -05:00
Lioncash
1c3371c921
core_timing: Convert core timing into a class
...
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.
2019-02-15 21:50:25 -05:00
Lioncash
1d2de5c4b5
core_timing: Rename CoreTiming namespace to Core::Timing
...
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.
2019-02-12 12:42:17 -05:00
Zach Hilman
0ac4caaa54
scheduler: Avoid manual Reschedule call
...
This will automatically occur anyway when PrepareReschedule is called
2018-12-03 21:22:09 -05:00
Zach Hilman
5d50fa0824
scheduler: Only work steal higher priority threads from other cores
2018-12-03 17:29:30 -05:00
Zach Hilman
9caabad517
svc: Avoid performance-degrading unnecessary reschedule
2018-12-02 00:44:40 -05:00
Zach Hilman
1a72e1681c
scheduler: Add explanations for YieldWith and WithoutLoadBalancing
2018-11-22 00:33:53 -05:00
Zach Hilman
b1c19bc88f
svc: Implement yield types 0 and -1
2018-11-18 23:44:19 -05:00
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;
}
2018-10-26 12:49:11 -04:00