summaryrefslogtreecommitdiffstats
path: root/src/core/hle/kernel/object.h (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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/object: Remove unnecessary std::move from DynamicObjectCast()Lioncash2018-09-281-2/+1
| | | | | | | | | boost::static_pointer_cast for boost::intrusive_ptr (what SharedPtr is), takes its parameter by const reference. Given that, it means that this std::move doesn't actually do anything other than obscure what the function's actual behavior is, so we can remove this. To clarify, this would only do something if the parameter was either taking its argument by value, by non-const ref, or by rvalue-reference.
* kernel: Eliminate kernel global stateLioncash2018-08-291-3/+7
| | | | | | | | | | | | | | | | | | | | | | 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/object: Tighten object against data racesLioncash2018-08-131-7/+8
| | | | | | | | | | Despite being covered by a global mutex, we should still ensure that the class handles its reference counts properly. This avoids potential shenanigans when it comes to data races. Given this is the root object that drives quite a bit of the kernel object hierarchy, ensuring we always have the correct behavior (and no races) is a good thing.
* kernel: Move object class to its own source filesLioncash2018-08-021-0/+100
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.