summaryrefslogtreecommitdiffstats
path: root/src/core/hle/svc.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-01-11SVC: Wake up the thread after the delay in WaitSync1Subv1-3/+2
2015-01-10Logging: Log all called service functions (under trace). Compile out all trace logs under release for performance.archshift1-1/+0
2015-01-09Kernel: Start using boost::intrusive_ptr for lifetime managementYuri Kunde Schlesner1-13/+18
2015-01-09Thread: Reduce use of Handles and move some funcs to inside the class.Yuri Kunde Schlesner1-20/+31
2015-01-09Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner1-0/+1
2015-01-09SVC: Implemented the Timer service calls.Subv1-4/+32
2015-01-09SVC: Fixed SleepThread.Subv1-0/+4
It will now properly wait the specified number of nanoseconds and then wake up the thread.
2015-01-07Warn if a new thread is intended to be run on the system CPU core until we implement correct scheduling for such a thread.Kevin Hartman1-0/+5
2014-12-31SOC_U: Preliminary implementation of sockets.Subv1-1/+13
Stubbed CreateMemoryBlock Using Berkeley sockets, and Winsock2.2 on Windows. So far ftpony creates the socket and accepts incoming connections SOC_U: Renamed functions to maintain consistency Also prevents possible scope errors / conflicts with the actual Berkeley socket functions SOCU: Close all the opened sockets when cleaning up SOCU
2014-12-28Kernel: New handle managerYuri Kunde Schlesner1-19/+9
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.
2014-12-28Rename ObjectPool to HandleTableYuri Kunde Schlesner1-5/+5
2014-12-21License changepurpasmart961-1/+1
2014-12-21Thread: Wait current thread on svc_SleepThreadbunnei1-1/+2
- Removed unused VBLANK sleep mode - Added error log for bad context switch - Renamed VerifyWait to CheckWaitType to be more clear
2014-12-15Remove SyncRequest from K::Object and create a new K::Session typeYuri Kunde Schlesner1-7/+4
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-13Kernel/Semaphores: Fixed buildSubv1-2/+2
2014-12-13SVC: Implemented ReleaseSemaphore.Subv1-3/+10
This behavior was tested on hardware, however i'm still not sure what use the "initial_count" parameter has
2014-12-13SVC: Implemented svcCreateSemaphoreSubv1-1/+10
ToDo: Implement svcReleaseSemaphore * Some testing against hardware needed
2014-12-13Convert old logging calls to new logging macrosYuri Kunde Schlesner1-27/+27
2014-12-12MemMap: Renamed "GSP" heap to "linear", as this is not specific to GSP.bunnei1-1/+1
- Linear simply indicates that the mapped physical address is always MappedVAddr+0x0C000000, thus this memory can be used for hardware devices' DMA (such as the GPU).
2014-12-04SVC: Implemented GetThreadId.Subv1-4/+5
For now threads are using their Handle value as their Id, it should not really cause any problems because Handle values are unique in Citra, but it should be changed. I left a ToDo there because this is not correct behavior as per hardware.
2014-11-26SVC: Add debug log to ArbitrateAddress.bunnei1-0/+2
2014-11-26SVC: SleepThread should yield to the next ready thread.bunnei1-0/+3
2014-11-24HLE: Revamp error handling throrough the HLE codeYuri Kunde Schlesner1-31/+37
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-19Remove trailing spaces in every file but the ones imported from SkyEye, AOSP or generatedEmmanuel Gil Peyrot1-14/+14
2014-11-19Kernel:Add missing permissions in shared memory & svcpurpasmart961-0/+4
2014-11-18core: Mark some hle functions as staticLioncash1-26/+26
These functions are not referred to by their linkage name outside of the translation unit, so they can be marked as static.
2014-10-30Fix some warningsSean1-3/+3
2014-09-09core: Prune redundant includesarchshift1-3/+0
2014-09-09Added string_util to common, small changes in loader.cpparchshift1-1/+1
2014-08-19SVC: Added support for svc_GetSystemTick.bunnei1-1/+6
Changed HLE function return methods to be static inline functions.
2014-08-18Core: Alter the kernel string functions to use std::string instead of const char*.Lioncash1-5/+5
Most functions already operate on std::strings. This also removes the need to manually null terminate thread names.
2014-08-17Core: Fix a formatting error in svc.cppLioncash1-3/+2
entry_point would not be added to the string. Also used StringFromFormat so that the buffer is unnecessary.
2014-08-08SVC: Fixed typo with MapMemoryBlock DEBUG_LOG call.bunnei1-1/+1
2014-08-06SVC: Removed ArbitrateAddress log message that spams to much.bunnei1-2/+0
2014-07-09Kernel: Added preliminary support for address arbiters.bunnei1-8/+10
AddressArbiter: Added documentation comment, fixed whitespace issue. AddressArbiter: Fixed incorrect comment, reordered if-statement to be more clear. SVC: Removed trailing whitespace.
2014-07-05SharedMemory: Updated MapSharedMemory to use an enum for permissions.bunnei1-10/+9
- Also added some safety checks to MapSharedMemory.
2014-07-05GSP: Fixed to use real shared memory object, various cleanups.bunnei1-5/+6
- Previously, used a hard-coded shared memory handle of 0x10002000 (as used by libctru homebrew) GSP: Added name for shared memory. GSP: Cleaned up assertion message.
2014-06-13SVC: Renamed all function wrapper templates to Wrap, moved to HLE namespace.bunnei1-126/+126
2014-06-13SVC: Cleaned up function wrappers to pass in correct argument types.bunnei1-148/+138
2014-06-13SVC: Moved declaration of "wait" variable in SendSyncRequest for improved readability.bunnei1-1/+1
2014-06-13HLE: Updated all uses of NULL to nullptr (to be C++11 compliant)bunnei1-107/+107
2014-06-13HLE: Updated various handle debug assertions to be more clear.bunnei1-6/+6
2014-06-13Kernel: Added real support for thread and event blockingbunnei1-28/+31
- SVC: Added ExitThread support - SVC: Added SignalEvent support - Thread: Added WAITTYPE_EVENT for waiting threads for event signals - Thread: Added support for blocking on other threads to finish (e.g. Thread::Join) - Thread: Added debug function for printing current threads ready for execution - Thread: Removed hack/broken thread ready state code from Kernel::Reschedule - Mutex: Moved WaitCurrentThread from SVC to Mutex::WaitSynchronization - Event: Added support for blocking threads on event signalling Kernel: Added missing algorithm #include for use of std::find on non-Windows platforms.
2014-06-02svc: updated WaitSynchronizationN to properly use first pointer argumentbunnei1-3/+3
2014-06-02svc: changed DuplicateHandle log message from "error" to "debug"bunnei1-1/+1
2014-06-02svc: added GetThreadPriority and SetThreadPriority, added (incomplete) DuplicateHandle supportbunnei1-3/+26
2014-06-02kernel: changed main thread priority to default, updated Kernel::Reschedule to use PrepareReschedulebunnei1-2/+7
2014-06-02svc: cleaned up function_wrappers, updated various SVCs to make use of pointer argumentsbunnei1-16/+18
2014-06-01svc: updated waitSychronization to not overwrite handle on return, added stub for SleepThread (does nothing)bunnei1-2/+21
2014-05-30hle: cleaned up log messagesbunnei1-27/+28
2014-05-30svc: updated OutputDebugString to use OS_LOGbunnei1-1/+1
2014-05-30svc: changed unimplemented SVC log messages from "debug" messages to "error" messagesbunnei1-8/+8
2014-05-30svc: added svcClearEvent, stubbed function for svcArbitrateAddress, and various fixesbunnei1-22/+32
- force kernel reschedule after svcWaitSynchronization - fixed some bugs with passing in pointer arguments - cleaned up some comments and log messages
2014-05-28svc: implemented WaitSynchronization1, WaitSynchronizationN, and CreateEventbunnei1-14/+54
2014-05-27kernel: updated SyncRequest to take boolean thread wait result as a parameterbunnei1-2/+9
2014-05-27svc: added some assertionsbunnei1-6/+4
2014-05-27svc: changed SendSyncRequest to use Kernel::Object SyncRequest (instead of just service Interface class)bunnei1-2/+2
2014-05-27svc: added stub for DuplicateHandle SVC callbunnei1-1/+8
2014-05-23svc: added a check to ensure that a service was implemented before attempting to connect to its portbunnei1-1/+5
2014-05-23thread: renamed "WaitCurThread" to "WaitCurrentThread", removed unused "reason" argumentbunnei1-2/+2
2014-05-23thread: removed unused SwitchContext/Reschedule reason field, added missing arg parameter to SVC CreateThreadbunnei1-8/+5
2014-05-22svc: added Kernel::Reschedule to svc WaitSynchronization1, updated log messages to include newly created handlesbunnei1-4/+7
2014-05-21svc: enabled use of newly created kernel thread handlebunnei1-5/+5
2014-05-21mutex: refactored the interface to code to return a Mutex* handlebunnei1-1/+1
2014-05-21mutex: initial commit of HLE modulebunnei1-4/+5
2014-05-21svc: added some commentsbunnei1-0/+7
2014-05-21thread: moved threading calls to the Kernel namespacebunnei1-2/+2
2014-05-21renamed "syscall" module to "svc" (more accurate naming)bunnei1-5/+7
2014-05-19renamed "session" to "handle"bunnei1-3/+3
2014-05-19fix warningbunnei1-1/+1
2014-05-19renamed "UID" to "Handle" where appropriatebunnei1-2/+2
2014-05-18- added stub for CreateEventbunnei1-8/+22
- changed some stubbed SVCs to return unique handle names for debugging purposes
2014-05-18added stubbed function for WaitSynchronizationNbunnei1-3/+13
2014-05-17cleanups to SVC CreateThreadbunnei1-8/+15
2014-05-16- added SVC stubs for QueryMemory and GetThreadIdbunnei1-2/+14
- added SVC structs MemoryInfo and PageInfo
2014-05-16- added ThreadContext structbunnei1-8/+12
- cleaned up CreateThread svc
2014-05-14added CreateThread, CreateMutex, and ReleaseMutex SVC stubs (just parameter decoding for now)bunnei1-6/+37
2014-05-08removed unnecessary log messagebunnei1-1/+1
2014-05-07- added debug logging to syscall.cppbunnei1-134/+162
- added stubbed HLE syscall functions for svc_GetResourceLimit and svc_GetResourceLimitCurrentValues
2014-05-02- added some function wrappers for HLEbunnei1-2/+17
- added stub for SVC CreateAddressArbiter - added OutputDebugString SVC
2014-04-25fixed bug where svc_ControlMemory was not properly getting passed in parametersbunnei1-2/+2
2014-04-25- added preliminary support for svc_MapMemoryBlockbunnei1-4/+34
- added shared memory region - moarrrr cleanups to memory_map
2014-04-18renamed hw_lcd module to just lcdbunnei1-2/+0
2014-04-18added GSP heap memory allocationbunnei1-1/+25
2014-04-17- fixed tabs in function_wrappers.hbunnei1-126/+138
- fixed log message wording in hle.cpp - added syscall stubs for CloseHandle and WaitSynchronization1
2014-04-13- added HLE to connect to "srv:" servicebunnei1-128/+138
- added a manager for keeping track of services/ports - added a memory mapped region for memory accessed by HLE - added HLE for GetThreadCommandBuffer function
2014-04-12- renamed hle_syscall to just syscallbunnei1-62/+64
- added service.h as an initial service interface
2014-04-11added remaining known syscall functions to Syscall_Tablebunnei1-0/+80
2014-04-11base code to call a syscall from ARM11 appcorebunnei1-4/+51
2014-04-11changed some naming/misc cleanupsbunnei1-2/+2
2014-04-11- removed syscall classes (will just use HLEFunction)bunnei1-4/+6
- added hle.cpp and module registration - removed unused code
2014-04-11added initial modules for setting up SysCall HLEbunnei1-0/+22