aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
AgeCommit message (Collapse)Author
2017-10-19hle: Fix QueryMemory response for MemoryInfo.bunnei
2017-10-14hle: Initial implementation of NX service framework and IPC.bunnei
2017-10-14svc: Some logging cleanup.bunnei
2017-10-14svc: Initial nx impl. for QueryMemory, ConnectToPort, SendSyncRequest, etc.bunnei
2017-06-29Merge pull request #2793 from Subv/replyandreceiveSebastian Valle
Kernel/SVC: Partially implemented svcReplyAndReceive
2017-06-29Kernel/SVC: Pass the current thread as a parameter to ↵Subv
ClientSession::SendSyncRequest.
2017-06-25Kernel/SVC: Partially implemented svcReplyAndReceive.Subv
It behaves mostly as WaitSynchronizationN with wait_all = false, except for IPC buffer translation. The target thread of an IPC response will now wake up when responding. IPC buffer translation is currently not implemented. Error passing back to svcSendSyncRequest is currently not implemented.
2017-06-23Kernel: Implement AcceptSession SVCYuri Kunde Schlesner
2017-06-23Kernel: Implement CreateSessionToPort SVCYuri Kunde Schlesner
2017-06-22Kernel: Implement CreateSession SVCYuri Kunde Schlesner
2017-05-29Kernel: Move HandleTable to a separate fileYuri Kunde Schlesner
2017-05-29Kernel: Move WaitObject to a separate fileYuri Kunde Schlesner
Now that HandleTable doesn't directly depend on WaitObject anymore, this can be separated from the main kernel.h header.
2017-05-29Kernel: Removed HandleTable::GetWaitObjectYuri Kunde Schlesner
This isn't necessary anymore since plain Get works correctly for WaitObjects.
2017-05-24Kernel: Centralize error definitions in errors.hYuri Kunde Schlesner
2017-05-07Remove ability to load symbol mapsYuri Kunde Schlesner
This was now mostly unused except by thread creation, which used a symbol of the entrypoint, if available, to name the thread.
2017-04-01Fix OutputDebugString syscallMichael Theall
2017-03-09Refined thread launch on syscore error messagesFernando Sahmkow
2017-02-21Timers: Return an error when calling SetTimer with negative timeouts.Subv
2017-01-11Threads: Check the process' resource limit for the max allowed priority when ↵Subv
creating a thread and remove the priority clamping code.
2017-01-11Thread: Added priority range checking to svcSetThreadPriority and removed ↵Subv
priority clamping code from Thread::SetPriority.
2017-01-06Merge pull request #2410 from Subv/sleepthreadbunnei
Don't yield execution in SleepThread(0) if there are no available threads to run
2017-01-06Kernel: Fix SharedMemory objects always returning error when addr = 0 (#2404)Hyper
Closes #2400
2017-01-05Kernel: Don't attempt to yield execution in SleepThread(0) if there are no ↵Subv
available threads to run. With this we avoid an useless temporary deschedule of the current thread.
2017-01-05Kernel: Remove Thread::wait_objects_index and use wait_objects to hold all ↵Subv
the objects that a thread is waiting on.
2017-01-04Kernel: Use different thread statuses when a thread calls ↵Subv
WaitSynchronization1 and WaitSynchronizationN with wait_all = true. This commit removes the overly general THREADSTATUS_WAIT_SYNCH and replaces it with two more granular statuses: THREADSTATUS_WAIT_SYNCH_ANY when a thread waits on objects via WaitSynchronization1 or WaitSynchronizationN with wait_all = false. THREADSTATUS_WAIT_SYNCH_ALL when a thread waits on objects via WaitSynchronizationN with wait_all = true.
2017-01-04Kernel/Mutex: Propagate thread priority changes to other threads inheriting ↵Subv
the priority via mutexes
2017-01-04Kernel/Mutex: Update a mutex priority when a thread stops waiting on it.Subv
2017-01-04Kernel/Mutex: Implemented priority inheritance.Subv
The implementation is based on reverse engineering of the 3DS's kernel. A mutex holder's priority will be temporarily boosted to the best priority among any threads that want to acquire any of its held mutexes. When the holder releases the mutex, it's priority will be boosted to the best priority among the threads that want to acquire any of its remaining held mutexes.
2017-01-04Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.Subv
This will be useful when implementing mutex priority inheritance.
2017-01-04Kernel/Synch: Do not attempt a reschedule on every syscall.Subv
Not all syscalls should cause reschedules, this commit attempts to remedy that, however, it still does not cover all cases.
2016-12-22core: Replace "AppCore" nomenclature with just "CPU".bunnei
2016-12-21Address clang-format issues.bunnei
2016-12-21core: Remove HLE module, consolidate code & various cleanups.bunnei
2016-12-21core: Consolidate core and system state, remove system module & cleanups.bunnei
2016-12-17Thread: remove the thread from the thread list when exitingwwylele
2016-12-16Merge pull request #2260 from Subv/schedulingbunnei
Threading: Reworked the way our scheduler works.
2016-12-14Fixed the codestyle to match our clang-format rules.Subv
2016-12-14Fixed the codestyle to match our clang-format rules.Subv
2016-12-10Properly remove a thread from its wait_objects' waitlist when it is awoken ↵Subv
by a timeout.
2016-12-09WaitSynch: Removed unused variables and reduced SharedPtr copies.Subv
Define a variable with the value of the sync timeout error code. Use a boost::flat_map instead of an unordered_map to hold the equivalence of objects and wait indices in a WaitSynchN call.
2016-12-08Use std::move where appropriate.Subv
2016-12-05Return an error code when connecting to a saturated port.Subv
The error code was taken from the 3DS kernel.
2016-12-05KServerPorts now have an HLE handler "template", which is inherited by all ↵Subv
ServerSessions created from it.
2016-12-04Threading: Added some utility functions and const correctness.Subv
2016-12-03Threading: Reworked the way our scheduler works.Subv
Threads will now be awakened when the objects they're waiting on are signaled, instead of repeating the WaitSynchronization call every now and then. The scheduler is now called once after every SVC call, and once after a thread is awakened from sleep by its timeout callback. This new implementation is based off reverse-engineering of the real kernel. See https://gist.github.com/Subv/02f29bd9f1e5deb7aceea1e8f019c8f4 for a more detailed description of how the real kernel handles rescheduling.
2016-12-01Threads do not wait for the server endpoint to call AcceptSession before ↵Subv
returning from a ConnectToPort or GetServiceHandle call.
2016-11-30A bit of a redesign.Subv
Sessions and Ports are now detached from each other. HLE services are handled by means of a SessionRequestHandler class, Interface now inherits from this class. The File and Directory classes are no longer kernel objects, but SessionRequestHandlers instead, bound to a ServerSession when requested. File::OpenLinkFile now creates a new session pair and binds the File instance to it.
2016-11-30 Kernel/IPC: Use Ports and Sessions as the fundamental building block of ↵Subv
Inter Process Communication. All handles obtained via srv::GetServiceHandle or svcConnectToPort are references to ClientSessions. Service modules will wait on the counterpart of those ClientSessions (Called ServerSessions) using svcReplyAndReceive or svcWaitSynchronization[1|N], and will be awoken when a SyncRequest is performed. HLE Interfaces are now ClientPorts which override the HandleSyncRequest virtual member function to perform command handling immediately.
2016-09-22name objectswwylele
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.