summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/kernel.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* kernel: remove TimeManagerLiam2022-12-191-6/+3
|
* Merge pull request #9182 from liamwhite/services-are-processesbunnei2022-11-101-1/+1
|\ | | | | kernel: assign KProcess to service threads
| * service_thread: register service threads to the logical owner processLiam2022-11-041-1/+1
| |
* | service_thread: fix deletionLiam2022-11-071-5/+5
| |
* | Merge pull request #9173 from bunnei/kern-update-15liamwhite2022-11-051-5/+18
|\ \ | |/ |/| Kernel: Various updates for FW 15.0.x
| * core: hle: kernel: Integrate system KSystemResource.bunnei2022-11-041-5/+18
| |
* | kernel: fix port trackingLiam2022-10-311-8/+0
| |
* | kernel: invert session request handling flowLiam2022-10-311-0/+9
|/
* kernel: add KSessionRequestLiam2022-10-191-0/+4
|
* core: hle: kernel: k_process: Improve management of page table & cleanup.bunnei2022-10-191-0/+3
|
* core: hle: kernel: Integration application memory block slab manager.bunnei2022-10-191-0/+7
|
* kernel: remove KWritableEventLiam2022-10-131-4/+0
|
* kernel: unlayer CPU interrupt handlingLiam2022-07-251-8/+0
|
* Project AndioKelebek12022-07-221-0/+3
|
* kernel: make current thread pointer thread localLiam2022-06-231-0/+3
|
* kernel: implement KProcess suspensionLiam2022-06-141-3/+8
|
* general: Convert source file copyright comments over to SPDXMorph2022-04-231-3/+2
| | | | | This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
* hidbus: Implement hidbus and ringcongerman772022-04-161-0/+6
|
* hle: kernel: Unify and integrate reference tracking for KServerPort/KServerSession.bunnei2022-04-081-0/+8
| | | | - These are not managed elsewhere, and need to be tracked and closed on emulation shutdown.
* hle: kernel: Create a default thread for services that do not need their own host thread.bunnei2022-04-021-3/+13
|
* core: Reduce unused includesameerj2022-03-191-1/+0
|
* core: hle: kernel: Remove server session tracking.bunnei2022-03-151-8/+0
| | | | - These are now allocated/managed by emulated memory, so we do not need to track and free them on shutdown.
* core: hle: kernel: Update init_slab_heap, use device memory, and add KThreadLocalPage and KPageBuffer.bunnei2022-03-151-6/+8
| | | | | | - Refreshes our slab initialization code to latest known behavior. - Moves all guest kernel slabs into emulated device memory. - Adds KThreadLocalPage and KPageBuffer, which we will use for accurate TLS management.
* hle: kernel: k_memory_manager: Rework for latest kernel behavior.bunnei2022-02-281-0/+4
| | | | | | - Updates the KMemoryManager implementation against latest documentation. - Reworks KMemoryLayout to be accessed throughout the kernel. - Fixes an issue with pool sizes being incorrectly reported.
* core: hle: kernel: Instantiate a kernel instance of KWorkerTaskManager.bunnei2022-01-151-0/+7
|
* Merge pull request #7462 from bunnei/kernel-improve-schedulingbunnei2021-12-131-0/+5
|\ | | | | Kernel: Improve threading & scheduling V3
| * hle: kernel: Add a flag for indicating that the kernel is currently shutting down.bunnei2021-12-071-0/+2
| |
| * core: hle: kernel: Reflect non-emulated threads as core 3.bunnei2021-12-071-0/+3
| |
* | kernel: svc: Implement Map/UnmapProcessMemory and Create/ControlCodeMemoryitsmeft242021-12-051-0/+4
|/ | | | Used by Skyline modding framework
* Fix memory leakFeng Chen2021-10-271-0/+8
|
* Fix KShareMemory object leakFeng Chen2021-09-291-0/+4
|
* kernel: Add missing <functional> includeMorph2021-09-111-0/+1
|
* Revert "kernel: Various improvements to scheduler"bunnei2021-08-261-3/+0
|
* core: hle: kernel: Reflect non-emulated threads as core 3.bunnei2021-08-071-0/+3
|
* hle: kernel: Track and release server sessions, and protect methods with locks.bunnei2021-07-211-0/+9
|
* hle: kernel: Provide methods for tracking dangling kernel objects.bunnei2021-07-211-0/+8
|
* hle: kernel: Implement named service ports using service interface factory.bunnei2021-05-111-7/+11
| | | | - This allows us to create a new interface each time ConnectToNamedPort is called, removing the assumption that these are static.
* hle: kernel: Move slab resource counts to Kernel.bunnei2021-05-061-0/+10
|
* hle: kernel: Migrate to KHandleTable.bunnei2021-05-061-3/+4
|
* hle: kernel: Rename Process to KProcess.bunnei2021-05-061-9/+9
|
* hle: kernel: Remove deprecated Object class.bunnei2021-05-061-2/+0
|
* hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.bunnei2021-05-061-1/+5
|
* hle: kernel: Migrate KClientPort to KAutoObject.bunnei2021-05-061-3/+3
|
* hle: kernel: Migrate KResourceLimit to KAutoObject.bunnei2021-05-061-16/+22
|
* hle: kernel: Migrate KTransferMemory to KAutoObject.bunnei2021-05-061-0/+4
|
* hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.bunnei2021-05-061-0/+8
|
* hle: kernel: Migrate KReadableEvent and KWritableEvent to KAutoObject.bunnei2021-05-061-0/+4
|
* hle: kernel: Move slab heaps to their own container.bunnei2021-05-061-10/+15
|
* hle: kernel: Move slab heap management to KernelCore.bunnei2021-05-061-4/+32
|
* hle: kernel: Migrate KProcess to KAutoObject.bunnei2021-05-061-2/+2
|
* hle: kernel: Migrate more of KThread to KAutoObject.bunnei2021-05-061-1/+10
|
* hle: kernel: k_memory_layout: Derive memory regions based on board layout.bunnei2021-03-211-1/+1
|
* hle: kernel: Migrate MemoryManager to KMemoryManager.bunnei2021-02-191-10/+6
|
* hle: kernel: Migrate to KMemoryBlock, KMemoryBlockManager, and others.bunnei2021-02-191-3/+3
|
* hle: kernel: Migrate SlabHeap to KSlabHeap.bunnei2021-02-191-4/+6
|
* hle: kernel: Rename SharedMemory to KSharedMemory.bunnei2021-02-191-9/+9
|
* kernel: Rewrite resource limit to be more accurateChloe Marcec2021-01-301-2/+2
| | | | Matches closer to hardware
* hle: kernel: Allocate a dummy KThread for each host thread, and use it for scheduling.bunnei2021-01-291-2/+2
|
* kernel: k_light_lock: Simplify EmuThreadHandle implementation.bunnei2021-01-291-1/+5
|
* hle: kernel: Move single core "phantom mode" out of KThread.bunnei2021-01-291-0/+4
| | | | - This is a workaround that does not belong in a kernel primitive.
* core: hle: kernel: Rename Thread to KThread.bunnei2021-01-291-3/+3
|
* hle: kernel: Remove unnecessary AddressArbiter definition.bunnei2021-01-111-1/+0
|
* core: hle: kernel: Update KSynchronizationObject.bunnei2021-01-111-6/+0
|
* hle: kernel: Move ServiceThread ownership to KernelCore.bunnei2020-12-291-0/+17
| | | | - Fixes a circular dependency which prevented threads from being released on shutdown.
* hle: kernel: Rewrite scheduler implementation based on Mesopshere.bunnei2020-12-061-10/+7
|
* core: arm: Implement InvalidateCacheRange for CPU cache invalidation.bunnei2020-11-291-0/+2
|
* hle: kernel: multicore: Replace n-JITs impl. with 4 JITs.bunnei2020-11-291-0/+3
|
* kernel: Add missing includeLioncash2020-07-161-0/+1
|
* General: Cleanup legacy code.Fernando Sahmkow2020-06-271-3/+0
|
* General: Move ARM_Interface into Threads.Fernando Sahmkow2020-06-271-1/+7
|
* General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running.Fernando Sahmkow2020-06-271-0/+4
|
* Kernel: Preempt Single core on redudant yields.Fernando Sahmkow2020-06-271-0/+2
|
* General: Initial Setup for Single Core.Fernando Sahmkow2020-06-271-0/+3
|
* General: Recover Prometheus project from harddrive failure Fernando Sahmkow2020-06-271-0/+19
| | | | | | | 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.
* kernel: Initialize memory layout for new VMM.bunnei2020-04-171-0/+44
|
* Kernel: Address Feedback.Fernando Sahmkow2020-02-221-3/+3
|
* Kernel: Implement Time Manager.Fernando Sahmkow2020-02-221-0/+7
|
* Kernel: Rename ThreadCallbackHandleTable and Setup Thread Ids on Kernel.Fernando Sahmkow2020-02-221-5/+18
|
* Kernel: Make global scheduler depend on KernelCoreFernando Sahmkow2020-02-221-0/+7
|
* Kernel: Refactor synchronization to better match REFernando Sahmkow2020-02-111-0/+7
|
* System: Address FeedbackFernando Sahmkow2020-01-271-1/+1
|
* Core: Refactor CPU Management.Fernando Sahmkow2020-01-251-0/+17
| | | | This commit moves ARM Interface and Scheduler handling into the kernel.
* kernel: Remove unnecessary includesLioncash2019-12-081-0/+1
| | | | | | Over the course of the changes to the kernel code, a few includes are no longer necessary, particularly with the change over to std::shared_ptr from Boost's intrusive_ptr.
* core_timing: Use better reference tracking for EventType. (#3159)bunnei2019-11-271-1/+1
| | | | | | | * core_timing: Use better reference tracking for EventType. - Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects. - Removes need for unique names - we won't be using this for save states anyways.
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154)bunnei2019-11-251-6/+7
| | | | | | * 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.
* Kernel: Reverse global accessor removal.Fernando Sahmkow2019-10-151-6/+0
|
* Kernel: Address Feedback.Fernando Sahmkow2019-10-151-1/+1
|
* Kernel: Remove global system accessor from WaitObjectFernando Sahmkow2019-10-151-0/+6
|
* Add interfacing to the Global SchedulerFernando Sahmkow2019-10-151-0/+7
|
* kernel: Differentiate kernel and user processes when picking IDZach Hilman2019-06-101-1/+4
| | | | This allows kernel internal type processes to be assigned IDs in the KIP range while userland processes are assigned in the user range.
* kernel/svc: Implement svcGetProcessListLioncash2019-04-021-0/+3
| | | | | | This service function simply copies out a specified number of kernel process IDs, while simultaneously reporting the total number of processes.
* kernel/kernel: Remove unnecessary forward declarationLioncash2019-03-241-3/+0
| | | | | This is no longer necessary, as ResultVal isn't used anywhere in the header.
* kernel: Make the address arbiter instance per-processLioncash2019-03-081-6/+0
| | | | | | | | | | Now that we have the address arbiter extracted to its own class, we can fix an innaccuracy with the kernel. Said inaccuracy being that there isn't only one address arbiter. Each process instance contains its own AddressArbiter instance in the actual kernel. This fixes that and gets rid of another long-standing issue that could arise when attempting to create more than one process.
* kernel/address_arbiter: Pass in system instance to constructorLioncash2019-03-051-6/+13
| | | | | Allows getting rid of reliance on the global accessor functions and instead operating on the provided system instance.
* kernel/address_arbiter: Convert the address arbiter into a classLioncash2019-03-051-0/+7
| | | | | | Places all of the functions for address arbiter operation into a class. This will be necessary for future deglobalizing efforts related to both the memory and system itself.
* core_timing: Convert core timing into a classLioncash2019-02-161-2/+7
| | | | | | | | | | | 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-2/+2
| | | | | | 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.
* kernel: Remove the Timer classLioncash2019-02-011-11/+0
| | | | | | | | | | | | A holdover from citra, the Horizon kernel on the switch has no prominent kernel object that functions as a timer. At least not to the degree of sophistication that this class provided. As such, this can be removed entirely. This class also wasn't used at all in any meaningful way within the core, so this was just code sitting around doing nothing. This also allows removing a few things from the main KernelCore class that allows it to use slightly less resources overall (though very minor and not anything really noticeable).
* kernel/thread: Make thread_id a 64-bit valueLioncash2018-12-191-1/+1
| | | | | The kernel uses a 64-bit value for the thread ID, so we shouldn't be using a 32-bit value.
* kernel/process: Make process_id a 64-bit valueLioncash2018-12-191-1/+1
| | | | | In the actual kernel, this is a 64-bit value, so we shouldn't be using a 32-bit type to handle it.
* kernel/resource_limit: Clean up interfaceLioncash2018-11-201-4/+2
| | | | | | | | | | | | | Cleans out the citra/3DS-specific implementation details that don't apply to the Switch. Sets the stage for implementing ResourceLimit instances properly. While we're at it, remove the erroneous checks within CreateThread() and SetThreadPriority(). While these are indeed checked in some capacity, they are not checked via a ResourceLimit instance. In the process of moving out Citra-specifics, this also replaces the system ResourceLimit instance's values with ones from the Switch.
* kernel/process: Make the handle table per-processLioncash2018-10-201-6/+0
| | | | | | | | In the kernel, there isn't a singular handle table that everything gets tossed into or used, rather, each process gets its own handle table that it uses. This currently isn't an issue for us, since we only execute one process at the moment, but we may as well get this out of the way so it's not a headache later on.
* kernel/thread: Use a regular pointer for the owner/current processLioncash2018-10-101-5/+5
| | | | | | | | | | | 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).
* core: Migrate current_process pointer to the kernelLioncash2018-09-071-0/+9
| | | | | | | | | | Given we now have the kernel as a class, it doesn't make sense to keep the current process pointer within the System class, as processes are related to the kernel. This also gets rid of a subtle case where memory wouldn't be freed on core shutdown, as the current_process pointer would never be reset, causing the pointed to contents to continue to live.
* service: Migrate global named port map to the KernelCore classLioncash2018-09-021-0/+18
| | | | | | Now that we have a class representing the kernel in some capacity, we now have a place to put the named port map, so we move it over and get rid of another piece of global state within the core.
* kernel: Eliminate kernel global stateLioncash2018-08-291-5/+84
| | | | | | | | | | | | | | | | | | | | | | 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.
* core/memory: Get rid of 3DS leftoversLioncash2018-08-031-1/+1
| | | | Removes leftover code from citra that isn't needed.
* kernel: Move object class to its own source filesLioncash2018-08-021-110/+0
| | | | | | 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.
* Qt: Update the WaitTree widget to show info about the current mutex of each thread.Subv2018-04-211-4/+0
|
* kernel: Move stack region outside of application heap.bunnei2018-03-161-4/+0
|
* hle: Remove Domain and SyncObject kernel objects.bunnei2018-01-251-16/+0
|
* clang-formatMerryMage2018-01-161-1/+0
|
* kernel: Increase default stack size to 64K.bunnei2018-01-141-1/+1
|
* kernel: Rename Semaphore to ConditionVariable.bunnei2018-01-091-2/+2
|
* kernel: Add basic support for Domain object.bunnei2017-12-291-0/+17
|
* Merge pull request #2839 from Subv/global_kernel_lockJames Rowe2017-08-241-1/+1
|\ | | | | 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).
| * 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).Subv2017-08-221-1/+1
| | | | | | | | 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.
* | Warnings: Add UNREACHABLE macros to switches that contemplate all possible values.Subv2017-08-211-0/+3
|/
* Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner2017-05-301-115/+1
|
* Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner2017-05-301-53/+0
| | | | | Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
* Kernel: Removed HandleTable::GetWaitObjectYuri Kunde Schlesner2017-05-301-9/+0
| | | | | This isn't necessary anymore since plain Get works correctly for WaitObjects.
* Kernel: Extract dynamic Object pointer cast into its own functionYuri Kunde Schlesner2017-05-291-11/+24
|
* Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner2017-05-251-7/+0
|
* Merge pull request #2397 from Subv/pulsebunnei2017-01-101-1/+1
|\ | | | | Kernel: Implemented Pulse event and timers.
| * Kernel: Implemented Pulse event and timers.Subv2017-01-051-1/+1
| | | | | | | | Closes #1904
* | Kernel/Mutex: Update a mutex priority when a thread stops waiting on it.Subv2017-01-041-1/+1
| |
* | Kernel/Mutex: Implemented priority inheritance.Subv2017-01-041-1/+1
| | | | | | | | | | | | | | 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.
* | Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv2017-01-041-4/+5
|/ | | | This will be useful when implementing mutex priority inheritance.
* core: Remove HLE module, consolidate code & various cleanups.bunnei2016-12-221-1/+2
|
* Merge pull request #2260 from Subv/schedulingbunnei2016-12-161-1/+7
|\ | | | | Threading: Reworked the way our scheduler works.
| * WaitSynch: Removed unused variables and reduced SharedPtr copies.Subv2016-12-091-1/+4
| | | | | | | | | | | | 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.
| * Threading: Reworked the way our scheduler works.Subv2016-12-041-0/+3
| | | | | | | | | | | | | | | | | | | | 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.
* | Kernel: Remove the Redirection handle type.Subv2016-12-051-2/+0
| |
* | Fixed the rebase mistakes.Subv2016-12-011-18/+16
| |
* | fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv2016-12-011-2/+3
| |
* | Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.Subv2016-12-011-17/+19
|/ | | | | | | 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.
* Kernel/Loader: Grab the system mode from the NCCH ExHeader.Subv2016-11-201-2/+2
| | | | | | | 3dsx and elf files default to system mode 2 (96MB allocated to the application). This allows Home Menu to boot without modifications. Closes #1849
* move ResetType to kernel.hwwylele2016-09-221-0/+6
|
* implement wait tree widgetwwylele2016-09-221-0/+3
|
* Remove empty newlines in #include blocks.Emmanuel Gil Peyrot2016-09-211-4/+1
| | | | | | | This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
* Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner2016-09-191-2/+1
|
* Sources: Run clang-format on everything.Emmanuel Gil Peyrot2016-09-181-28/+38
|
* Kernel/SVC: Implemented svcCreatePort.Subv2016-06-111-1/+2
|
* Kernel: Added ClientPort and ServerPort classes.Subv2016-06-051-2/+4
| | | | This is part of an ongoing effort to implement support for multiple processes.
* Kernel: Add CodeSet case to Object::IsWaitableYuri Kunde Schlesner2015-07-121-0/+1
|
* Core: Properly configure address space when loading a binaryYuri Kunde Schlesner2015-07-121-0/+1
| | | | | | 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.
* Common: Cleanup key_map includes.Emmanuel Gil Peyrot2015-06-281-4/+3
|
* kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei2015-06-171-6/+0
|
* Kernel: Fix a warning introduced with ResourceLimit, and remove the fallback code to prevent it from happening again.Emmanuel Gil Peyrot2015-05-211-2/+1
|
* Core/ResourceLimits: Implemented the basic structure of ResourceLimits.Subv2015-05-151-1/+2
| | | | | | 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.
* Kernel: Remove g_program_idYuri Kunde Schlesner2015-05-091-6/+0
| | | | This has been obsoleted by the field in Process.
* Kernel: Introduce skeleton Process class to hold process dataYuri Kunde Schlesner2015-05-091-7/+3
|
* Common: Remove common.hYuri Kunde Schlesner2015-05-071-1/+2
|
* Move typedefs from kernel.h to more appropriate placesYuri Kunde Schlesner2015-05-071-10/+1
|
* Kernel: Properly initialize and shutdown all modules.bunnei2015-05-021-2/+3
|
* Build: Fixed some warningsSubv2015-02-121-1/+1
|
* Kernel: Make WaitObjects share ownership of Threads waiting on themYuri Kunde Schlesner2015-02-021-5/+5
| | | | | | | | | | | | | | | | 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.)
* Kernel: Remove Object::GetHandle (it's not used anymore :D)Yuri Kunde Schlesner2015-02-021-5/+0
|
* Kernel: Introduce unique Object ids for debuggingYuri Kunde Schlesner2015-02-021-0/+6
|
* Remove result.h InvalidHandleYuri Kunde Schlesner2015-01-301-1/+2
| | | | | It was only being used in two places, where it was replaced by a local constant.
* Move VAddr/PAddr typedefs to kernel.hYuri Kunde Schlesner2015-01-301-0/+5
|
* Kernel: Renamed some functions for clarity.bunnei2015-01-221-4/+4
| | | | | - ReleaseNextThread->WakeupNextThread - ReleaseAllWaitingThreads->WakeupAllWaitingThreads.
* Kernel: Changed "ShouldWait" to return bool and "Acquire" to return void.bunnei2015-01-221-6/+3
|
* WaitObject: Renamed "Wait" to "ShouldWait", made "ShouldWait" and "Acquire" pure virtual.bunnei2015-01-221-10/+4
|
* Session: Change to a WaitObject.bunnei2015-01-221-0/+1
|
* Kernel: Moved Wait and Acquire to WaitObject, added way to retrieve a WaitObject safely.bunnei2015-01-221-16/+55
|
* Kernel: Get rid of WaitTypes and simplify lots of code, removing hacks.bunnei2015-01-221-3/+2
|
* WaitSynchronizationN: Refactor to fix several bugsbunnei2015-01-221-6/+6
| | | | | | - Separate wait checking from waiting the current thread - Resume thread when wait_all=true only if all objects are available at once - Set output to correct wait object index when there are duplicate handles
* Kernel: Separate WaitSynchronization into Wait and Acquire methods.bunnei2015-01-221-2/+11
|
* WaitSynchronizationN: Implement return valuesbunnei2015-01-221-3/+4
|
* WaitObject: Added RemoveWaitingThread, fixed a bug, and cleanup.bunnei2015-01-221-1/+7
|
* Kernel: Added WaitObject and changed "waitable" objects inherit from it.bunnei2015-01-221-0/+25
|
* Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner2015-01-091-8/+13
|
* Kernel: Don't re-assign object's handle when duplicating oneYuri Kunde Schlesner2015-01-091-1/+1
|
* Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner2015-01-091-1/+3
|
* SVC: Implemented the Timer service calls.Subv2015-01-091-0/+1
|
* Kernel: New handle managerYuri Kunde Schlesner2014-12-281-81/+109
| | | | | | | | | | | This handle manager more closely mirrors the behaviour of the CTR-OS one. In addition object ref-counts and support for DuplicateHandle have been added. Note that support for DuplicateHandle is still experimental, since parts of the kernel still use Handles internally, which will likely cause troubles if two different handles to the same object are used to e.g. wait on a synchronization primitive.
* Kernel: Replace GetStaticHandleType by HANDLE_TYPE constantsYuri Kunde Schlesner2014-12-281-1/+1
|
* Rename ObjectPool to HandleTableYuri Kunde Schlesner2014-12-281-6/+6
|
* Merge pull request #291 from purpasmart96/licensebunnei2014-12-211-1/+1
|\ | | | | License change
| * License changepurpasmart962014-12-211-1/+1
| |
* | Merge pull request #316 from yuriks/thread-handlebunnei2014-12-201-0/+12
|\ \ | |/ |/| Kernel: Implement support for current thread pseudo-handle
| * Kernel: Implement support for current thread pseudo-handleYuri Kunde Schlesner2014-12-201-0/+12
| | | | | | | | This boots a few (mostly Nintendo 1st party) games further.
* | Filesystem/Archives: Implemented the SaveData archiveSubv2014-12-181-0/+6
|/ | | | | | | | | | The savedata for each game is stored in /savedata/<ProgramID> for NCCH files. ELF files and 3DSX files use the folder 0 because they have no ID information Got rid of the code duplication in File and Directory Files that deal with the host machine's file system now live in DiskFile, similarly for directories and DiskDirectory and archives with DiskArchive. FS_U: Use the correct error code when a file wasn't found
* Remove SyncRequest from K::Object and create a new K::Session typeYuri Kunde Schlesner2014-12-151-14/+2
| | | | | | | This is a first step at fixing the conceptual insanity that is our handling of service and IPC calls. For now, interfaces still directly derived from Session because we don't have the infrastructure to do it properly. (That is, Processes and scheduling them.)
* kernel: Remove unused log argumentsLioncash2014-12-131-3/+3
|
* Convert old logging calls to new logging macrosYuri Kunde Schlesner2014-12-131-7/+10
|
* kernel: Make some functions constLioncash2014-12-041-2/+2
|
* HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner2014-11-241-27/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | All service calls in the CTR OS return result codes indicating the success or failure of the call. Previous to this commit, Citra's HLE emulation of services and the kernel universally either ignored errors or returned dummy -1 error codes. This commit makes an initial effort to provide an infrastructure for error reporting and propagation which can be use going forward to make HLE calls accurately return errors as the original system. A few parts of the code have been updated to use the new system where applicable. One part of this effort is the definition of the `ResultCode` type, which provides facilities for constructing and parsing error codes in the structured format used by the CTR. The `ResultVal` type builds on `ResultCode` by providing a container for values returned by function that can report errors. It enforces that correct error checking will be done on function returns by preventing the use of the return value if the function returned an error code. Currently this change is mostly internal since errors are still suppressed on the ARM<->HLE border, as a temporary compatibility hack. As functionality is implemented and tested this hack can be eventually removed.
* Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot2014-11-191-5/+5
|
* Remove extraneous semicolonsLioncash2014-11-181-1/+1
|
* Kernel: Add a Directory object and a getter for it from an Archive object.Emmanuel Gil Peyrot2014-09-171-0/+1
|
* Core: Use std::array for managing kernel object spaceLioncash2014-08-191-3/+4
| | | | These avoid relying on memset for clearing the arrays.
* Core: Alter the kernel string functions to use std::string instead of const char*.Lioncash2014-08-181-3/+3
| | | | Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
* Kernel: Added preliminary support for address arbiters.bunnei2014-07-091-1/+1
| | | | | | | | AddressArbiter: Added documentation comment, fixed whitespace issue. AddressArbiter: Fixed incorrect comment, reordered if-statement to be more clear. SVC: Removed trailing whitespace.
* Kernel: Added stubbed code to support creation of kernel Archive objects.bunnei2014-06-271-0/+1
|
* Kernel: Added freeing of kernel objects on emulator shutdown.bunnei2014-06-131-0/+6
|
* Kernel: Updated several member functions to be constbunnei2014-06-131-2/+2
|
* Kernel: Made SyncRequest not pure virtual, with a default implementation of error (as this is not required for all kernel objects)bunnei2014-06-131-2/+4
|
* kernel: moved position of * for GetTypeName and GetNamebunnei2014-06-031-2/+2
|
* kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedulebunnei2014-06-021-0/+1
|
* kernel: added WaitSynchronization method to Kernel::Objectbunnei2014-05-271-0/+7
|
* kernel: updated SyncRequest to take boolean thread wait result as a parameterbunnei2014-05-271-1/+8
|
* kernel: added enum for known CurrentThread and CurrentProcess handlesbunnei2014-05-271-0/+5
|
* kernel: add a SyncRequest method to KernelObject for use with svcSendSyncRequestbunnei2014-05-271-0/+1
|
* kernel: refactored function naming to remove "__" prefixbunnei2014-05-231-2/+7
|
* kernel: fixed include, in general include "common.h" not "common_types.h"bunnei2014-05-211-1/+1
|
* - created a Kernel namespacebunnei2014-05-211-31/+44
| | | | | - cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues) - added handle types for all different CTROS handles
* - updated service(s) to be KernelObject'sbunnei2014-05-191-4/+5
| | | | - various cleanups
* - moved Handle/Result definitions to kernel.hbunnei2014-05-191-1/+2
| | | | - added ResetType enum
* - replaced KERNELOBJECT_MAX_NAME_LENGTH with KERNEL_MAX_NAME_LENGTHbunnei2014-05-171-3/+2
| | | | - added KERNEL_DEFAULT_STACK_SIZE definition (0x4000)
* changed "UID" to "Handle" to be a little more consistent with CTR namingbunnei2014-05-161-13/+16
|
* - added __KernelLoadExec functionbunnei2014-05-141-13/+24
| | | | - fixed some logging
* added initial kernel/thread modulesbunnei2014-05-101-0/+121