aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/result.h
AgeCommit message (Collapse)Author
2019-11-12result: Add default error code for the ResultCode(-1) caseLioncash
Will be used to reduce the overall duplication of the same magic value all over the codebase in following changes.
2019-11-12result: Resolve sign-coversion warningsLioncash
The constructor was implicitly using signed->unsigned conversions to produce 0xFFFFFFFF. We can just specify this explicitly with UINT32_MAX.
2019-04-05hle/result: Remove unnecessary bitfield entry for ResultCodeLioncash
This is a hold over from the 3DS error codes in Citra.
2019-03-10core/hle/result: Remove now-unnecessary manually defined copy assignment ↵Lioncash
operator Previously this was required, as BitField wasn't trivially copyable. BitField has since been made trivially copyable, so now this isn't required anymore.
2019-03-10core/hle/result: Amend error in comment description for ResultCodeLioncash
Gets rid of another holdover from Citra, and describes the OS on the Switch instead.
2019-03-10core/hle/result: Remove now-unused constructor for ResultCodeLioncash
Now that the final stray ErrorDescription member was relocated, we can finally remove it and its relevant constructor in the ResultCode union.
2019-03-10core/hle/result: Relocate IPC error code to ipc_helpersLioncash
Relocates the error code to where it's most related, similar to how all the other error codes are. Previously we were including a non-generic error in the main result code header.
2019-03-05core/hle/ipc: Remove unnecessary includesLioncash
Removes a few inclusion dependencies from the headers or replaces existing ones with ones that don't indirectly include the required headers. This allows removing an inclusion of core/memory.h, meaning that if the memory header is ever changed in the future, it won't result in rebuilding the entirety of the HLE services (as the IPC headers are used quite ubiquitously throughout the HLE service implementations).
2018-11-16file_sys/errors: Extract FS-related error codes to file_sys/errors.hLioncash
Keeps filesystem-related error codes in one spot.
2018-08-28hle/result: Make ResultVal's move constructor as noexceptLioncash
Many containers within the standard library provide different behaviors based on whether or not a move constructor/assignment operator can be guaranteed not to throw or not. Notably, implementations will generally use std::move_if_noexcept (or an internal implementation of it) to provide strong exception guarantees. If a move constructor potentially throws (in other words, is not noexcept), then certain behaviors will create copies, rather than moving the values. For example, consider std::vector. When a std::vector calls resize(), there are two ways the elements can be relocated to the new block of memory (if a reallocation happens), by copy, or by moving the existing elements into the new block of memory. If a type does not have a guarantee that it will not throw in the move constructor, a copy will happen. However, if it can be guaranteed that the move constructor won't throw, then the elements will be moved. This just allows ResultVal to be moved instead of copied all the time if ever used in conjunction with containers for whatever reason.
2018-05-23Add & correct some error modulesgreggameplayer
2018-05-19Add and correct some Error Modules (#444)greggameplayer
* Add and correct some Error Modules
2018-03-28result: Check against self-assignment in ResultVal's copy assignment operatorLioncash
Avoids doing work that doesn't need to be done.
2018-02-27ResultCode: Mark any error code that isn't 0 as an error.Subv
2018-01-21fsp_srv: Various improvements to IStorage:Read implementation.bunnei
2017-10-31hle: Use Switch formatted result codes.bunnei
2017-06-18ResultVal: Remove MoveFrom()Yuri Kunde Schlesner
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue.
2017-06-18ResultVal: Add an rvalue overload of Unwrap()Yuri Kunde Schlesner
2017-06-06ResultVal: Add more convenience utils for creating and cascading resultsYuri Kunde Schlesner
2017-05-24Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner
2017-05-24GSP_GPU: Move error codes from result.h to local fileYuri Kunde Schlesner
2017-05-24FileSys: Move all result description to errors.hYuri Kunde Schlesner
2017-05-24result: Make error description a generic integerYuri Kunde Schlesner
It is now known that result code description vary depending on the module, and so they're best defined on a per-module basis. To support this, allow passing in an arbitrary integer instead of limiting to the ones in the ErrorDescription enum. These will be gradually migrated to their individual users, but a few will be kept as "common" codes shared by all modules.
2017-05-24Make BitField and ResultCode constexpr-initializableYuri Kunde Schlesner
2017-05-15Kernel: Use a Session object to keep track of the status of a Client/Server ↵Subv
session pair. Reduce the associated port's connection count when a ServerSession is destroyed.
2017-02-13file_sys: add Self NCCH archivewwylele
2016-12-14Merge pull request #2249 from Subv/sessions_v3Yuri Kunde Schlesner
Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
2016-12-05Return an error code when connecting to a saturated port.Subv
The error code was taken from the 3DS kernel.
2016-11-29FileSys: Implement OtherSaveDatawwylele
2016-11-19FileSys: add SDMCWriteOnlyArchivewwylele
2016-11-19FileSys: add ExtSaveDataArchivewwylele
ExtSaveData is more similar to SaveData, so let it be a subclass of SaveData
2016-11-19FileSys: add SaveDataArchivewwylele
The error checking of SaveDataArchive is completely different from DiskArchive, so it has to be a new class instead of a subclass of DiskArchive.
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot
2016-07-05Fix the errorcode of archive handleJamePeng
2016-06-30Result: fix and update ErrorModulewwylele
2016-06-01gsp::gpu: Reset g_thread_id in UnregisterInterruptRelayQueuemailwl
2016-05-12Kernel: Implemented shared memory permissions.Subv
2016-04-30VideoCore: Run include-what-you-use and fix most includes.Emmanuel Gil Peyrot
2016-04-27DSP_DSP: Add return IPC headersMerryMage
2016-03-30GSP: Return proper error codes for register writespurpasmart96
2016-03-20HLE/FS: Implemented GetFormatInfoSubv
Format information is currently only implemented for the ExtSaveData, SharedExtSaveData and SaveData archives, the information is stored in a file alongside the root folder of the archive.
2016-03-20HLE/FS: Return the proper error codes on file Read/Write operations.Subv
These operations are limited by the open flags specified while opening the file.
2016-03-20HLE/FS: Corrected the error codes for CreateFileSubv
2016-03-05core: Use unrestricted union to hold storage of ResultVal valueYuri Kunde Schlesner
2016-02-12BitField: Make trivially copyable and remove assignment operatorMerryMage
2016-01-14HLE/SVC: Implement UnmapMemoryBlock.Subv
This implementation will need to be (almost completely) changed when we implement multiprocess support.
2015-06-28Common: Cleanup key_map includes.Emmanuel Gil Peyrot
2015-05-07Common: Remove common.hYuri Kunde Schlesner