summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/object.cpp (follow)
Commit message (Collapse)AuthorAgeFilesLines
* kernel: Implement a more accurate IPC dispatch.bunnei2019-11-281-0/+1
|
* kernel/object: Remove unused handle type entryLioncash2019-04-031-1/+0
| | | | | | | | The AddressArbiter type isn't actually used, given the arbiter itself isn't a direct kernel object (or object that implements the wait object facilities). Given this, we can remove the enum entry entirely.
* core/hle/kernel: Split transfer memory handling out into its own classLioncash2019-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | Within the kernel, shared memory and transfer memory facilities exist as completely different kernel objects. They also have different validity checking as well. Therefore, we shouldn't be treating the two as the same kind of memory. They also differ in terms of their behavioral aspect as well. Shared memory is intended for sharing memory between processes, while transfer memory is intended to be for transferring memory to other processes. This breaks out the handling for transfer memory into its own class and treats it as its own kernel object. This is also important when we consider resource limits as well. Particularly because transfer memory is limited by the resource limit value set for it. While we currently don't handle resource limit testing against objects yet (but we do allow setting them), this will make implementing that behavior much easier in the future, as we don't need to distinguish between shared memory and transfer memory allocations in the same place.
* kernel: Remove the Timer classLioncash2019-02-011-1/+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).
* Fixed uninitialized memory due to missing returns in canaryDavid Marcec2018-12-191-0/+1
| | | | Functions which are suppose to crash on non canary builds usually don't return anything which lead to uninitialized memory being used.
* kernel/process: Make Process a WaitObjectLioncash2018-12-051-1/+1
| | | | | | | Process instances can be waited upon for state changes. This is also utilized by svcResetSignal, which will be modified in an upcoming change. This simply puts all of the WaitObject related machinery in place.
* kernel/object: Amend handle types to distinguish between readable and writable eventsLioncash2018-12-041-1/+2
| | | | | | | | | | | Two kernel object should absolutely never have the same handle ID type. This can cause incorrect behavior when it comes to retrieving object types from the handle table. In this case it allows converting a WritableEvent into a ReadableEvent and vice-versa, which is undefined behavior, since the object types are not the same. This also corrects ClearEvent() to check both kernel types like the kernel itself does.
* kernel/process: Make CodeSet a regular non-inherited objectLioncash2018-10-121-1/+0
| | | | | | | | These only exist to ferry data into a Process instance and end up going out of scope quite early. Because of this, we can just make it a plain struct for holding things and just std::move it into the relevant function. There's no need to make this inherit from the kernel's Object type.
* kernel: Eliminate kernel global stateLioncash2018-08-291-0/+2
| | | | | | | | | | | | | | | | | | | | | | 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.
* kernel: Move object class to its own source filesLioncash2018-08-021-0/+35
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.