aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/kernel.h
AgeCommit message (Collapse)Author
2018-04-20Qt: Update the WaitTree widget to show info about the current mutex of each ↵Subv
thread.
2018-03-16kernel: Move stack region outside of application heap.bunnei
2018-01-24hle: Remove Domain and SyncObject kernel objects.bunnei
2018-01-16clang-formatMerryMage
2018-01-14kernel: Increase default stack size to 64K.bunnei
2018-01-08kernel: Rename Semaphore to ConditionVariable.bunnei
2017-12-28kernel: Add basic support for Domain object.bunnei
2017-08-23Merge pull request #2839 from Subv/global_kernel_lockJames Rowe
Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
2017-08-22Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state ↵Subv
between the cpu thread and any other possible threads that might touch the kernel (network thread, etc). This mutex is acquired in SVC::CallSVC, ie, as soon as the guest application enters the HLE kernel, and should be acquired by the aforementioned threads before modifying kernel structures.
2017-08-21Warnings: Add UNREACHABLE macros to switches that contemplate all possible ↵Subv
values.
2017-05-29Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner
2017-05-29Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner
Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
2017-05-29Kernel: Removed HandleTable::GetWaitObjectYuri Kunde Schlesner
This isn't necessary anymore since plain Get works correctly for WaitObjects.
2017-05-29Kernel: Extract dynamic Object pointer cast into its own functionYuri Kunde Schlesner
2017-05-24Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner
2017-01-10Merge pull request #2397 from Subv/pulsebunnei
Kernel: Implemented Pulse event and timers.
2017-01-05Kernel: Implemented Pulse event and timers.Subv
Closes #1904
2017-01-04Kernel/Mutex: Update a mutex priority when a thread stops waiting on it.Subv
2017-01-04Kernel/Mutex: Implemented priority inheritance.Subv
The implementation is based on reverse engineering of the 3DS's kernel. A mutex holder's priority will be temporarily boosted to the best priority among any threads that want to acquire any of its held mutexes. When the holder releases the mutex, it's priority will be boosted to the best priority among the threads that want to acquire any of its remaining held mutexes.
2017-01-04Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv
This will be useful when implementing mutex priority inheritance.
2016-12-21core: Remove HLE module, consolidate code & various cleanups.bunnei
2016-12-16Merge pull request #2260 from Subv/schedulingbunnei
Threading: Reworked the way our scheduler works.
2016-12-09WaitSynch: Removed unused variables and reduced SharedPtr copies.Subv
Define a variable with the value of the sync timeout error code. Use a boost::flat_map instead of an unordered_map to hold the equivalence of objects and wait indices in a WaitSynchN call.
2016-12-05Kernel: Remove the Redirection handle type.Subv
2016-12-03Threading: Reworked the way our scheduler works.Subv
Threads will now be awakened when the objects they're waiting on are signaled, instead of repeating the WaitSynchronization call every now and then. The scheduler is now called once after every SVC call, and once after a thread is awakened from sleep by its timeout callback. This new implementation is based off reverse-engineering of the real kernel. See https://gist.github.com/Subv/02f29bd9f1e5deb7aceea1e8f019c8f4 for a more detailed description of how the real kernel handles rescheduling.
2016-11-30Fixed the rebase mistakes.Subv
2016-11-30fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block ↵Subv
of Inter Process Communication.
2016-11-30 Kernel/IPC: Use Ports and Sessions as the fundamental building block of ↵Subv
Inter Process Communication. All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions. Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed. HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately.
2016-11-19Kernel/Loader: Grab the system mode from the NCCH ExHeader.Subv
3dsx and elf files default to system mode 2 (96MB allocated to the application). This allows Home Menu to boot without modifications. Closes #1849
2016-09-22move ResetType to kernel.hwwylele
2016-09-22implement wait tree widgetwwylele
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot
2016-06-11Kernel/SVC: Implemented svcCreatePort.Subv
2016-06-05Kernel: Added ClientPort and ServerPort classes.Subv
This is part of an ongoing effort to implement support for multiple processes.
2015-07-12Kernel: Add CodeSet case to Object::IsWaitableYuri Kunde Schlesner
2015-07-11Core: Properly configure address space when loading a binaryYuri Kunde Schlesner
The code now properly configures the process image to match the loaded binary segments (code, rodata, data) instead of just blindly allocating a large chunk of dummy memory.
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot
2015-06-16kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei
2015-05-21Kernel: Fix a warning introduced with ResourceLimit, and remove the fallback ↵Emmanuel Gil Peyrot
code to prevent it from happening again.
2015-05-14Core/ResourceLimits: Implemented the basic structure of ResourceLimits.Subv
Implemented svcs GetResourceLimit, GetResourceLimitCurrentValues and GetResourceLimitLimitValues. Note that the resource limits do not currently keep track of used objects, since we have no way to distinguish between an object created by the application, and an object created by some HLE module once we're inside Kernel::T::Create.
2015-05-08Kernel: Remove g_program_idYuri Kunde Schlesner
This has been obsoleted by the field in Process.
2015-05-08Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner
2015-05-07Common: Remove common.hYuri Kunde Schlesner
2015-05-06Move typedefs from kernel.h to more appropriate placesYuri Kunde Schlesner
2015-05-01Kernel: Properly initialize and shutdown all modules.bunnei
2015-02-12Build: Fixed some warningsSubv
2015-02-02Kernel: Make WaitObjects share ownership of Threads waiting on themYuri Kunde Schlesner
During normal operation, a thread waiting on an WaitObject and the object hold mutual references to each other for the duration of the wait. If a process is forcefully terminated (The CTR kernel has a SVC to do this, TerminateProcess, though no equivalent exists for threads.) its threads would also be stopped and destroyed, leaving dangling pointers in the WaitObjects. The solution is to simply have the Thread remove itself from WaitObjects when it is stopped. The vector of Threads in WaitObject has also been changed to hold SharedPtrs, just in case. (Better to have a reference cycle than a crash.)
2015-02-02Kernel: Remove Object::GetHandle (it's not used anymore :D)Yuri Kunde Schlesner