- Sep 13, 2018
-
-
Lioncash authored
Previously, these were sitting outside of the Kernel namespace, which doesn't really make sense, given they're related to the Thread class which is within the Kernel namespace.
-
- Aug 29, 2018
-
-
Lioncash authored
As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header.
-
- Aug 25, 2018
-
-
Lioncash authored
Gets all of these types and interfaces out of the global namespace.
-
- Aug 04, 2018
-
-
Lioncash authored
This amends cases where crashes can occur that were missed due to the odd way the previous code was set up (using 3DS memory regions that don't exist).
-
- Aug 02, 2018
-
-
Lioncash authored
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.
-
- Aug 01, 2018
-
-
Lioncash authored
Given there's no implementation, we may as well remove the code entirely.
-
- Jul 31, 2018
-
-
Lioncash authored
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
-
- Jul 21, 2018
-
-
Subv authored
Note that there's currently a dynarmic bug preventing this register from being written.
-
- Jul 20, 2018
-
-
Lioncash authored
Makes the thread status strongly typed, so implicit conversions can't happen. It also makes it easier to catch mistakes at compile time.
-
- Jun 22, 2018
-
-
Michael Scire authored
-
Michael Scire authored
-
- Jun 21, 2018
-
-
Michael Scire authored
-
Michael Scire authored
-
Michael Scire authored
-
Michael Scire authored
-
- May 10, 2018
- Apr 23, 2018
-
-
Subv authored
Verified with a hwtest and implemented based on reverse engineering. Thread A's priority will get bumped to the highest priority among all the threads that are waiting for a mutex that A holds. Once A releases the mutex and ownership is transferred to B, A's priority will return to normal and B's priority will be bumped.
-
- Apr 21, 2018
-
-
Subv authored
-
Subv authored
-
Subv authored
-
Subv authored
Switch mutexes are no longer kernel objects, they are managed in userland and only use the kernel to handle the contention case. Mutex addresses store a special flag value (0x40000000) to notify the guest code that there are still some threads waiting for the mutex to be released. This flag is updated when a thread calls ArbitrateUnlock. TODO: * Fix svcWaitProcessWideKey * Fix svcSignalProcessWideKey * Remove the Mutex class.
-
- Mar 19, 2018
-
-
bunnei authored
-
- Feb 18, 2018
- Jan 10, 2018
-
-
Subv authored
Threads: Added enum values for the Switch's 4 cpu cores and implemented svcGetInfo(AllowedCpuIdBitmask)
-
- Jan 09, 2018
-
-
Subv authored
-
- Dec 31, 2017
-
-
bunnei authored
This is kinda crufty, but we need it for now to update guest state variables.
-
- Dec 29, 2017
-
-
bunnei authored
-
- Oct 01, 2017
-
-
Subv authored
-
- Sep 30, 2017
-
-
bunnei authored
-
Huw Pascoe authored
-
- Sep 28, 2017
-
-
Subv authored
This change makes for a clearer (less confusing) path of execution in the scheduler, now the code to execute when a thread awakes is closer to the code that puts the thread to sleep (WaitSynch1, WaitSynchN). It also allows us to implement the special wake up behavior of ReplyAndReceive without hacking up WaitObject::WakeupAllWaitingThreads. If savestates are desired in the future, we can change this implementation to one similar to the CoreTiming event system, where we first register the callback functions at startup and assign their identifiers to the Thread callback variable instead of directly assigning a lambda to the wake up callback variable.
-
- Sep 26, 2017
-
-
Subv authored
Don't automatically assume that Thread::Create will only be called when the parent process is currently scheduled. This assumption will be broken when applets or system modules are loaded.
-
- May 29, 2017
-
-
Yuri Kunde Schlesner authored
Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
-
- May 25, 2017
-
-
Yuri Kunde Schlesner authored
-
- Feb 27, 2017
-
-
Yuri Kunde Schlesner authored
-
- Jan 06, 2017
-
-
Subv authored
Kernel: Don't attempt to yield execution in SleepThread(0) if there are no available threads to run. With this we avoid an useless temporary deschedule of the current thread.
-