aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/svc.cpp
AgeCommit message (Collapse)Author
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.
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot
2016-06-11Kernel/SVC: Implemented svcCreatePort.Subv
2016-05-21SVC::WaitSynchronizationN: Reschedule at the endwwylele
2016-05-17Set fpscr for new threadsJannik Vogel
2016-05-12Kernel: Implemented shared memory permissions.Subv
2016-05-12Kernel/SharedMemory: Properly implemented shared memory support.Subv
Applications can request the kernel to allocate a piece of the linear heap for them when creating a shared memory object. Shared memory areas are now properly mapped into the target processes when calling svcMapMemoryBlock. Removed the APT Shared Font hack as it is no longer needed.
2016-05-08Merge pull request #1766 from Subv/log_cpubunnei
Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1)
2016-05-07Kernel/Threading: Warn when a thread can be scheduled in the Syscore (Core 1).Subv
We do not currently implement any cores other than the AppCore (Core 0).
2016-04-30Merge pull request #1647 from mailwl/acu-closeasyncbunnei
ac:u: stub CloseAsync; align memory size in svc:GetProcessInfo(type=2)
2016-04-29Common: Remove section measurement from profiler (#1731)Yuri Kunde Schlesner
This has been entirely superseded by MicroProfile. The rest of the code can go when a simpler frametime/FPS meter is added to the GUI.
2016-04-21ac:u: stub CloseAsync; check memory size aling in svc:GetProcessInfo(type=2)mailwl
2016-03-12svc: Move ResetType enum to the kernel event headerLioncash
2016-03-01ThreadProcessorId_All on SVC::CreateThreadKloen
2016-01-14HLE/SVC: Implement UnmapMemoryBlock.Subv
This implementation will need to be (almost completely) changed when we implement multiprocess support.
2015-12-25svc: Remove superfluous printf argumentLioncash
2015-12-12svc: Fix compilation with LOG_TRACE enabledLioncash
2015-11-30Kernel: Implement svcGetSystemInfoYuri Kunde Schlesner
This makes smealum/ctrulib@b96dd51d3349961189d4ab1bc2a5c45deff21c09 work with Citra.
2015-08-30SVC: Advance time when calling GetSystemTick to escape busy-wait loopsYuri Kunde Schlesner
Cubic Ninja waited for the frame to end by spinning on a loop calling GetSystemTick while doing nothing else. Since GetSystemTick doesn't cause a reschedule (which advances time), this meant that very little emulated time would pass inside that loop, causing the game to spend most of the frame burning away CPU.
2015-08-24Integrate the MicroProfile profiling libraryYuri Kunde Schlesner
This brings goodies such as a configurable user interface and multi-threaded timeline view.
2015-08-16Kernel: Implement svcGetProcessInfo in a basic wayYuri Kunde Schlesner
This also adds some basic memory usage accounting. These two types are used by Super Smash Bros. during startup.
2015-08-16Kernel: Add more infrastructure to support different memory layoutsYuri Kunde Schlesner
This adds some structures necessary to support multiple memory regions in the future. It also adds support for different system memory types and the new linear heap mapping at 0x30000000.
2015-08-16Move core/mem_map.{cpp,h} => core/hle/kernel/memory.{cpp,h}Yuri Kunde Schlesner
2015-08-16Kernel: Properly implement ControlMemory FREE and COMMITYuri Kunde Schlesner
2015-07-25Merge pull request #888 from zawata/Warning-Fixes-2Yuri Kunde Schlesner
Core\HLE : Fix Warning
2015-07-21dyncom: Pass SVC immediates directly.Lioncash
Previously it would just re-read the already decoded instruction and extract the immediate value.
2015-07-17Kernel/SVC: Implemented svcQueryProcessMemorySubv
2015-07-17Kernel/SVC: Implemented svcQueryMemory.Subv
2015-07-17Core\HLE : Fix Warningzawata
"signed/unsigned mismatch"
2015-06-16kernel: Fix svcWaitSynch to always acquire requested wait objects.bunnei