Commit Graph

34 Commits (d5fb9fd12cfd06503c61326e03359b43b73aefc2)

Author SHA1 Message Date
german77 12b6162852 service: irs: Migrate service to new interface 2 years ago
Narr the Reg ee847f8ff0 hid_core: Move hid to it's own subproject 2 years ago
Narr the Reg 6a244465ce service: hid: Implement NpadResource and NpadData 2 years ago
Liam 5165ed9efd service: fetch objects from the client handle table 2 years ago
Narr the Reg cff2d0e19e service: hid: Create appropriate hid resources 2 years ago
Narr the Reg e588f341ed service: irs: Implement moment image processor 2 years ago
Liam 65be230fdd service: move hle_ipc from kernel 3 years ago
Liam de4e5db330 hid: avoid direct pointer access of transfer memory objects 3 years ago
Liam ceda2d280e general: rename CurrentProcess to ApplicationProcess 3 years ago
Narr the Reg 4a307a7b3a core: hid: Only set the polling mode to the correct side 3 years ago
german77 d05ea2f3eb input_common: Fix issue where ring and irs are enabled at the same time 3 years ago
Narr the Reg 459fb2b213 input_common: Implement joycon ir camera 3 years ago
Narr the Reg 5a74ced59a yuzu: Silence some clang warnings 3 years ago
german77 3ac4f3a252 service: irs: Implement clustering processor 3 years ago
Narr the Reg 403bdc4daf yuzu: Add webcam support and rebase to latest master 3 years ago
german77 097785e19e service: irs: Move to IRS namespace and minor fixes 3 years ago
german77 4539700595 service: irs: Split processors and implement ImageTransferProcessor 3 years ago
Narr the Reg e609bc1c6a service: hid: Improve stub of IRS 3 years ago
Morph 99ceb03a1c general: Convert source file copyright comments over to SPDX
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.
4 years ago
ameerj 7c4b6aab2e core: Remove unused includes 4 years ago
Morph 12c1766997 general: Replace RESULT_SUCCESS with ResultSuccess
Transition to PascalCase for result names.
4 years ago
bunnei 086db71e94 hle: kernel: Migrate KSharedMemory to KAutoObject. 5 years ago
bunnei 5e5933256b hle: kernel: Refactor IPC interfaces to not use std::shared_ptr. 5 years ago
bunnei 0d62f30b00 hle: kernel: Rename SharedMemory to KSharedMemory. 5 years ago
Lioncash 1a954b2a59 service: Eliminate usages of the global system instance
Completely removes all usages of the global system instance within the
services code by passing in the using system instance to the services.
5 years ago
Fernando Sahmkow e31425df38 General: Recover Prometheus project from harddrive failure
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.
5 years ago
bunnei 8bbc38a7bd service: irs: Update for new shared memory layout. 6 years ago
David Marcec 07823b61a1 Deglobalize System: IRS 6 years ago
Lioncash bd983414f6 core_timing: Convert core timing into a class
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.
7 years ago
Lioncash 48d9d66dc5 core_timing: Rename CoreTiming namespace to Core::Timing
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.
7 years ago
David Marcec a2cc3b10bb Changed logging to be "Log before execution", Added more error logging, all services should now log on some level 7 years ago
David 2513e086ab Stubbed IRS (#1349)
* Stubbed IRS

Currently we have no ideal way of implementing IRS. For the time being we should have the functions stubbed until we come up with a way to emulate IRS properly.

* Added IRS to logging backend

* Forward declared shared memory for irs
7 years ago
Lioncash 6ac955a0b4 hle/service: Default constructors and destructors in the cpp file where applicable
When a destructor isn't defaulted into a cpp file, it can cause the use
of forward declarations to seemingly fail to compile for non-obvious
reasons. It also allows inlining of the construction/destruction logic
all over the place where a constructor or destructor is invoked, which
can lead to code bloat. This isn't so much a worry here, given the
services won't be created and destroyed frequently.

The cause of the above mentioned non-obvious errors can be demonstrated
as follows:

------- Demonstrative example, if you know how the described error happens, skip forwards -------

Assume we have the following in the header, which we'll call "thing.h":

\#include <memory>

// Forward declaration. For example purposes, assume the definition
// of Object is in some header named "object.h"
class Object;

class Thing {
public:
    // assume no constructors or destructors are specified here,
    // or the constructors/destructors are defined as:
    //
    // Thing() = default;
    // ~Thing() = default;
    //

    // ... Some interface member functions would be defined here

private:
    std::shared_ptr<Object> obj;
};

If this header is included in a cpp file, (which we'll call "main.cpp"),
this will result in a compilation error, because even though no
destructor is specified, the destructor will still need to be generated by
the compiler because std::shared_ptr's destructor is *not* trivial (in
other words, it does something other than nothing), as std::shared_ptr's
destructor needs to do two things:

1. Decrement the shared reference count of the object being pointed to,
   and if the reference count decrements to zero,

2. Free the Object instance's memory (aka deallocate the memory it's
   pointing to).

And so the compiler generates the code for the destructor doing this inside main.cpp.

Now, keep in mind, the Object forward declaration is not a complete type. All it
does is tell the compiler "a type named Object exists" and allows us to
use the name in certain situations to avoid a header dependency. So the
compiler needs to generate destruction code for Object, but the compiler
doesn't know *how* to destruct it. A forward declaration doesn't tell
the compiler anything about Object's constructor or destructor. So, the
compiler will issue an error in this case because it's undefined
behavior to try and deallocate (or construct) an incomplete type and
std::shared_ptr and std::unique_ptr make sure this isn't the case
internally.

Now, if we had defaulted the destructor in "thing.cpp", where we also
include "object.h", this would never be an issue, as the destructor
would only have its code generated in one place, and it would be in a
place where the full class definition of Object would be visible to the
compiler.

---------------------- End example ----------------------------

Given these service classes are more than certainly going to change in
the future, this defaults the constructors and destructors into the
relevant cpp files to make the construction and destruction of all of
the services consistent and unlikely to run into cases where forward
declarations are indirectly causing compilation errors. It also has the
plus of avoiding the need to rebuild several services if destruction
logic changes, since it would only be necessary to recompile the single
cpp file.
7 years ago
Lioncash 82cb5f030d service/hid: Add irs services 7 years ago