Commit graph

24 commits

Author SHA1 Message Date
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.)
2014-12-15 18:26:17 -02:00
Yuri Kunde Schlesner 0600e2d8b5 Convert old logging calls to new logging macros 2014-12-13 02:08:02 -02:00
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.
2014-11-24 17:08:36 -02:00
Lioncash 7cbecde2ca Add static to some variables 2014-11-18 20:04:00 -05:00
Lioncash 72846c418e core: Mark some hle functions as static
These functions are not referred to by their linkage name outside of the translation unit, so they can be marked as static.
2014-11-17 22:41:49 -05:00
archshift 40a84833ae Added ReceiveNotification, PublishToSubscriber unimplemented functions to SRV 2014-11-01 23:15:38 -07:00
archshift 6e606c515f core: Prune redundant includes 2014-09-08 17:54:14 -07:00
bunnei fb908b9395 srv::Initialize: Return "success" status code. 2014-08-28 17:51:41 -04:00
bunnei 1b247b8031 SRV: Updated GetProcSemaphore to create an event instead of a mutex. 2014-08-05 23:54:27 -04:00
bunnei c95972275e HLE: Updated all uses of NULL to nullptr (to be C++11 compliant) 2014-06-13 09:51:13 -04:00
bunnei b78aff8585 svc: added optional name field to Event and Mutex (used for debugging) 2014-06-02 20:38:34 -04:00
bunnei 007b7edada srv: fix to log unimplemented service (instead of crash) 2014-05-29 23:54:09 -04:00
bunnei c404d22036 hle: cleaned up log messages 2014-05-29 23:26:58 -04:00
bunnei b08b3c154f srv: changed a NOTICE_LOG to DEBUG_LOG 2014-05-29 18:53:45 -04:00
bunnei 96b2105524 srv: added a real mutex for GetProcSemaphore (instead of stubbed) 2014-05-26 21:55:55 -04:00
bunnei 725d240bf7 renamed "UID" to "Handle" where appropriate 2014-05-18 18:24:24 -04:00
bunnei 772abad778 - moved Handle/Result definitions to kernel.h
- added ResetType enum
2014-05-18 18:12:29 -04:00
bunnei 39ee75fc8d added stubbed GetProcSemaphore - does nothing but avoids an exception 2014-05-16 23:25:16 -04:00
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)
2014-05-07 21:04:55 -04:00
bunnei cd0664eb77 - refactored how service functions are called
- added option to create/delete service handles
2014-04-24 22:16:54 -04:00
bunnei 9d1a17ca88 fixed bug with printing std::string in log messages 2014-04-16 21:22:15 -04:00
bunnei b8851305bd updated service comments 2014-04-16 20:46:05 -04:00
bunnei 32c3462047 - added stubbed out GSP::Gpu service interface
- various cleanups/refactors to HLE services
2014-04-16 00:03:41 -04:00
bunnei ffabed8c25 restructured hle:services completely to use function lookup tables 2014-04-15 23:28:03 -04:00