Quite a few service functions are stubbed but still pop all their
arguments, which can lead to unused variable warnings.
We can mark the unused arguments with [[maybe_unused]] to silence these
warnings until a full implementation of these functions are made.
Allows implementations to allocate the object and the shared_ptr control
block in one allocation instead of needing to do two separate
allocations.
Also looks much nicer to the reader.
This class is memcpy-ed and memcpy has the requirement that data passed
to it must be trivially copyable, otherwise the behavior is undefined.
This is trivial to resolve as BitField was made trivially copyable a
while ago, so this explicit copy assignment operator isn't necessary.
This can be removed as it's not used. Even if it were however, it would
be an incorrect forward declaration, as ServiceManager exists within the
Service::SM namespace, not the top-level SM namespace.
* ArmInterface: return ref instead of copy for GetTimer
* ArmInterface: add const ref GetTimer
* ArmInterface: return raw pointer instead of shared_ptr in GetTimer
* remove more unnecessary shared_ptr usage
* Fix save states
* fix unit tests
* am/am: Avoid redundant copy in GetProgramInfoFromCia()
We can just use a reference to the title metadata. Avoids copying
several data entries and std::vector instances that don't need to be
copied.
* hle/service: Avoid redundant copying of std::string
GetUserPath() returns the path as a reference, so we can make use of
said reference to avoid making copies.
By using a reference here, we avoid copying every single element in the
map, each of which contains a std::share_ptr and std::deque containing
std::vectors.
Allows interfaces to move the vector into the calls, avoiding any
reallocations.
Many existing call sites already std::move into the parameter, expecting
a move to occur. Only a few remain where this wasn't already
being done, which we can convert over.
This one is similar to the ReceiveCaptureBufferInfo function except it doesn't clear the capture buffer, according to 3dbrew.
This function is used by the Home Menu
The Home Menu uses this to determine whether it is allowed to launch an app (call StartApplication)
This is a no-op for us, we allow any and all titles to be launched. The official APT module holds a list of some forbidden titles like some versions of IronFall and Flipnote Studio 3D.
They are called by the Home Menu during initialization.
These functions will not see much use until we actually implement application jumping and system rebooting. For now we just need them to prevent some unmapped reads in the Home Menu due to the static buffers not being properly set up.
Also rewritten how GetArchiveResource works so that they all use the same interface.
We should decide what to do with these at some point.
Related to #3131 and #3110
* Kernel/Process: Notify the CPUs that a new pagetable has been set every time the process they're executing changes.
Previously the page table would only be changed when the current CPU's page table was changed, this lead to stale JIT states and the PC going to 0 when context-switching a different core inside the ThreadManager::SwitchContext function because the JIT for a new pagetable is only constructed upon receiving the change notification.
* Kernel/Process: Use the relevant CPU's last process to determine when to switch its current process.
Previously it was checking the kernel's current_process variable, which gets overwritten every time a CPU runs its slice. The rescheduling happens after all CPUs have run their slice so the code was effectively only checking the last CPU's process.