Commit Graph

53 Commits (e5a7f2ef29a8dc715ab9670dedb632a02b835372)

Author SHA1 Message Date
mailwl 5b136aa211 Set client SDK version to Service APIs 8 years ago
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 9 years ago
Emmanuel Gil Peyrot e5fcabdd69 Core: Cleanup file_sys includes. 10 years ago
Emmanuel Gil Peyrot 596b7c4f63 Common: Cleanup key_map includes. 10 years ago
Yuri Kunde Schlesner e1fbac3ca1 Common: Remove common.h 10 years ago
Yuri Kunde Schlesner ad3e25b414 De-inline functions from Interface, removing them from service.h
This reduces the time for a full recompile from 65.43s to 59.53s (~9%)
10 years ago
Subv 83a8975cb8 Services: Moved the PTM and APT services to their own folder
This coincidentally fixes an issue about the PTM service failing to create its SharedExtSaveData archive due to the FS service not being initialized by the time the creating code runs.

Ideally I'd like to move each process to its own folder, and have a single file per process that registers the service classes, which would be in their own files inside that folder. Then each service class would just call functions from the process to complete the commands.
10 years ago
Yuri Kunde Schlesner 6e11570862 Service: Store function names as const char* instead of std::string
Uses less memory (strings and function table is stored in constant data)
and speeds up start up (no need to allocate and copy strings).
10 years ago
Yuri Kunde Schlesner a79d21c83e Service: Clean-up Interface 10 years ago
Yuri Kunde Schlesner 8779b31fe6 Make Port/Service registration and querying more HW-accurate 10 years ago
archshift 228843c43e Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance. 10 years ago
Yuri Kunde Schlesner a6ad68190f Fix double-free in Service manager during shutdown
Fixes #423.
10 years ago
Yuri Kunde Schlesner 7e2903cb74 Kernel: New handle manager
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.
10 years ago
Yuri Kunde Schlesner 73fba22c01 Rename ObjectPool to HandleTable 10 years ago
purpasmart96 ebfd831ccb License change 10 years ago
Yuri Kunde Schlesner e321decf98 Remove SyncRequest from K::Object and create a new K::Session type
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.)
10 years ago
Yuri Kunde Schlesner 0600e2d8b5 Convert old logging calls to new logging macros 10 years ago
archshift 43a682a106 Log the cmd_buff arguments when citra comes across an unimplemented function 10 years ago
Yuri Kunde Schlesner 22c86824a4 Remove duplicated docs/update them for changed parameters. 10 years ago
Yuri Kunde Schlesner c2588403c0 HLE: Revamp error handling throrough the HLE code
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.
10 years ago
Emmanuel Gil Peyrot f5d38649c7 Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generated 10 years ago
Yuri Kunde Schlesner d72708c1f5 Add `override` keyword through the code.
This was automated using `clang-modernize`.
11 years ago
Lioncash d30747efea core: Pass string by reference in FetchFromPortName and DeleteService 11 years ago
Lioncash 98fa3f7cba Core: Alter the kernel string functions to use std::string instead of const char*.
Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
11 years ago
bunnei 004df76795 Merge branch 'threading' of https://github.com/bunnei/citra
Conflicts:
	src/core/hle/function_wrappers.h
	src/core/hle/service/gsp.cpp
11 years ago
bunnei c95972275e HLE: Updated all uses of NULL to nullptr (to be C++11 compliant) 11 years ago
bunnei 8cac527c94 Kernel: Updated several member functions to be const 11 years ago
bunnei 870c6146e7 service: added a error log messages for unimplemented WaitSynchronization 11 years ago
bunnei c451ad2835 service: cleaned up log messages 11 years ago
bunnei 545e6919ce service: added additional hack to return success on unimplemented service calls 11 years ago
bunnei 70af9d620b service: changed interface to return 0 (no error) when a service method is unimplemented - hack to make apps boot further 11 years ago
bunnei a432dc8f39 kernel: added WaitSynchronization method to Kernel::Object 11 years ago
bunnei 58a3adcdd2 kernel: updated SyncRequest to take boolean thread wait result as a parameter 11 years ago
bunnei 16fea415d0 service: Renamed Sync to SyncRequest 11 years ago
bunnei 0aa582bf89 service: fixed typo that MSVC did not catch as an error 11 years ago
bunnei 9bf7ce535a service: removed redundant include of common_types.h 11 years ago
bunnei 143bba2045 renamed "syscall" module to "svc" (more accurate naming) 11 years ago
bunnei 44336329ed - created a Kernel namespace
- cleaned up Kernel code a bit (moved stuff into namespace, fixed whitespace issues)
- added handle types for all different CTROS handles
11 years ago
bunnei 112904b832 - renamed NewHandle to CreateHandle
- updated CreateHandle/DeleteHandle to use KernelObject's
11 years ago
bunnei eab6fd01d7 - updated service(s) to be KernelObject's
- various cleanups
11 years ago
bunnei 725d240bf7 renamed "UID" to "Handle" where appropriate 11 years ago
bunnei 772abad778 - moved Handle/Result definitions to kernel.h
- added ResetType enum
11 years ago
bunnei 72622a1b5a - removed HLE mem "hack" and replaced with kernel mem region
- added a helper function for getting command buffer for services
- fixed bug where GSP DMA was incorrectly being done in DataSynchronizationBarrier (instead of gsp_TriggerCmdReqQueue)
11 years ago
bunnei 451a14f98c fixed weird spacing 11 years ago
bunnei cd0664eb77 - refactored how service functions are called
- added option to create/delete service handles
11 years ago
bunnei 32c3462047 - added stubbed out GSP::Gpu service interface
- various cleanups/refactors to HLE services
11 years ago
bunnei ffabed8c25 restructured hle:services completely to use function lookup tables 11 years ago
bunnei 7ec5950bc4 - extracted srv: calls from service.cpp and put in its own module
- added function tables for service calls
- lots of refactoring
11 years ago
bunnei 9f4d677cdf added framework for APT service (application and title launching service) 11 years ago