Commit Graph

3951 Commits

Author SHA1 Message Date
4c5731c34f Merge pull request #2971 from FernandoS27/new-scheduler-v2
Kernel: Implement a New Thread Scheduler V2
2019-10-28 10:53:27 +11:00
6fe89acf0d Merge pull request #2991 from lioncash/npad
hid/npad: Minor cleanup
2019-10-22 19:51:24 -04:00
8d8e495248 hid/npad: Fix incorrect connection boolean value in ConnectAllDisconnectedControllers()
We should be setting the connection state to true, otherwise we aren't
actually making the controllers connected like the function name
indicates.
2019-10-17 18:19:47 -04:00
d076466f26 hid/npad: Add missing break in default case
While not an issue, it does prevent fallthrough from occurring if
anything is ever added after this case (unlikely to occur, but this
turns a trivial "should not cause issues" into a definite "won't cause
issues).
2019-10-17 18:17:42 -04:00
26c84718c8 hid/npad: Replace std::for_each with ranged for loops
Performs the same behavior, but is built into the core language itself.

No functional change.
2019-10-17 18:16:36 -04:00
e433e99191 hid/npad: Remove redundant non-const variant of IsControllerSupported()
The const qualified variant can also be called in non-const contexts, so
we can remove the non-const variant to eliminate a bit of code
duplication.
2019-10-17 18:11:41 -04:00
a71e8066a1 hid/npad: Move function declarations
Clearly separate these from the variable declarations to make them more
visible.
2019-10-17 18:09:08 -04:00
b77430df70 apm/controller: Make SetPerformanceConfiguration() use an array of pairs over a map
While a map is an OK way to do lookups (and usually recommended in most
cases), this is a map that lives for the entire duration of the program
and only deallocates its contents when the program terminates.

Given the total size of the map is quite small, we can simply use a
std::array of pairs and utilize std::find_if to perform the same
behavior without loss of performance.

This eliminates a static constructor and places the data into the
read-only segment.

While we're at it, we can also handle malformed inputs instead of
directly dereferencing the resulting iterator.
2019-10-17 16:13:14 -04:00
141d929929 apm/controller: Make GetCurrentPerformanceMode() a const member function
This doesn't modify instance state, so it can be made const qualified.
2019-10-17 15:58:25 -04:00
ef9b31783d Merge pull request #2912 from FernandoS27/async-fixes
General fixes to Async GPU
2019-10-16 10:34:48 -04:00
2299950de1 Merge pull request #2972 from lioncash/system
{bcat, gpu, nvflinger}: Remove trivial usages of the global system accessor
2019-10-15 17:49:12 -04:00
cc1d7048b5 bcat: Remove use of global system accessors
Removes all uses of the global system accessor within the BCAT
interface.
2019-10-15 16:39:27 -04:00
64e652d8cb Kernel Thread: Cleanup THREADPROCESSORID_DONT_UPDATE. 2019-10-15 11:55:30 -04:00
e28c7f5217 Kernel: Address Feedback 2 2019-10-15 11:55:28 -04:00
a3524879be Kernel: Clang Format 2019-10-15 11:55:27 -04:00
c32520ceb7 Kernel: Reverse global accessor removal. 2019-10-15 11:55:26 -04:00
3073615dbc Kernel: Address Feedback. 2019-10-15 11:55:25 -04:00
25f8606a6d Kernel Scheduler: Make sure the global scheduler shutdowns correctly. 2019-10-15 11:55:24 -04:00
b3c1deba49 Kernel_Thread: Eliminate most global accessors. 2019-10-15 11:55:23 -04:00
0b72b34d89 KernelSVC: Assert that condition variable address is aligned to 4 bytes. 2019-10-15 11:55:22 -04:00
96b1b144af Kernel: Correct Paused scheduling 2019-10-15 11:55:21 -04:00
1c6a11ab14 Kernel: Corrections to Wait Objects clearing in which a thread could still be signalled after a timeout or a cancel. 2019-10-15 11:55:20 -04:00
27d571c084 Kernel: Correct redundant yields to only advance time forward. 2019-10-15 11:55:20 -04:00
7176857177 Kernel: Corrections to ModifyByWaitingCountAndSignalToAddressIfEqual 2019-10-15 11:55:19 -04:00
44e09e5f21 Kernel: Correct Results in Condition Variables and Mutexes 2019-10-15 11:55:18 -04:00
1ec1e81373 Kernel: Clang Format 2019-10-15 11:55:17 -04:00
e05a8c2385 Kernel: Remove global system accessor from WaitObject 2019-10-15 11:55:16 -04:00
0cf26cee59 Scheduler: Implement Yield Count and Core migration on Thread Preemption. 2019-10-15 11:55:16 -04:00
2d382de6fa Scheduler: Corrections to YieldAndBalanceLoad and Yield bombing protection. 2019-10-15 11:55:15 -04:00
b49c0dab87 Kernel: Initial implementation of thread preemption. 2019-10-15 11:55:14 -04:00
103f3a2fe5 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
82218c925a Kernel: Style and Corrections 2019-10-15 11:55:12 -04:00
fcc6b34fff Correct PrepareReschedule 2019-10-15 11:55:12 -04:00
3a94e7ea33 Comment and reorganize the scheduler 2019-10-15 11:55:11 -04:00
b5d1e44782 Add PrepareReschedule where required. 2019-10-15 11:55:10 -04:00
b8b7ebcece Correct compiling errors and addapt to the new interface. 2019-10-15 11:55:09 -04:00
9031502974 Correct Supervisor Calls to work with the new scheduler, 2019-10-15 11:55:08 -04:00
57a71f899a Add interfacing to the Global Scheduler 2019-10-15 11:55:07 -04:00
a1ac0c6cb4 Addapt thread class to the new Scheduler 2019-10-15 11:55:06 -04:00
b164d8ee53 Implement a new Core Scheduler 2019-10-15 11:55:04 -04:00
1911f85391 pl_u: Fix mismatched rebase size error in font encryption 2019-10-13 13:46:27 -04:00
36d829c27b pl_u: Use kernel physical memory 2019-10-13 13:46:27 -04:00
b3a8a094a5 pl_u: Remove excess static qualifier 2019-10-13 13:46:27 -04:00
40284c6868 pl_u: Use OSS system archives if real archives don't exist 2019-10-13 13:46:27 -04:00
574440d59f nvflinger/buffer_queue: Remove use of a global system accessor 2019-10-12 09:17:56 -04:00
e664c24355 Merge pull request #2921 from FreddyFunk/compiler-warnings-core
Services::ES fix casting warnings
2019-10-09 10:34:48 -04:00
b9c831de62 Merge pull request #2654 from DarkLordZach/lm-log-rewrite
lm: Rewrite logger to use core reporting services
2019-10-08 20:23:13 -04:00
29e15601f3 hid: Implement DeactivateNpad
Makes use of the already existing DeactivateController function.
2019-10-07 04:44:09 -07:00
c1e9ca4c08 hid: Stub SetNpadJoyAssignmentModeSingle and reorganize service commands 2019-10-07 04:43:34 -07:00
5326d3cb3a Merge pull request #2951 from lioncash/global
core: Remove Core::CurrentProcess()
2019-10-06 20:47:48 -04:00