wwylele
ea4217939a
Kernel: remove object's waiting thread if it is dead
9 years ago
Subv
3e80a1a1c1
Fixed the codestyle to match our clang-format rules.
9 years ago
Subv
00decc1180
Fixed the codestyle to match our clang-format rules.
9 years ago
Subv
7066deff78
Properly remove a thread from its wait_objects' waitlist when it is awoken by a timeout.
9 years ago
Subv
6df6ad46c4
Moved the HLE command buffer translation task to ServerSession instead of the HLE handler superclass.
9 years ago
Subv
d4815e828d
WaitSynch: Removed unused variables and reduced SharedPtr copies.
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.
9 years ago
Subv
17d8d69c6e
Added a framework for partially handling Session disconnections.
Further implementation will happen in a future commit.
Fixes a regression.
9 years ago
Subv
021e732815
Use std::move where appropriate.
9 years ago
Subv
fdf1d042e0
Use boost remove_erase_if instead of the erase-remove idiom
9 years ago
Subv
bf232b89f3
Improved the algorithm for GetHighestPriorityReadyThread.
9 years ago
Subv
06b2b80d31
Return an error code when connecting to a saturated port.
The error code was taken from the 3DS kernel.
9 years ago
Subv
708ece3fff
Split SessionRequestHandler::HandleSyncRequest into HandleSyncRequest, TranslateRequest and HandleSyncRequestImpl.
HandleSyncRequest now takes care of calling the command buffer translate function before actually invoking the command handler for HLE services.
9 years ago
Subv
728bb5f40b
Kernel: Remove the Redirection handle type.
9 years ago
Subv
977039e722
KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it.
9 years ago
Subv
44c59feca6
Threading: Added some utility functions and const correctness.
9 years ago
Subv
5bc10a74f6
Threading: Reworked the way our scheduler works.
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.
9 years ago
Subv
4703561c9e
Declare empty ServerSession and ClientSession constructors as default.
9 years ago
Subv
4c4f50dfaf
Fixed the rebase mistakes.
9 years ago
Subv
4f2326c8a9
A bit of a redesign.
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.
9 years ago
Subv
d2305d375f
IPC/HLE: Associate the ClientSessions with their parent port's HLE interface if it exists.
Pass the triggering ServerSession to the HLE command handler to differentiate which session caused the request.
10 years ago
Subv
edcacd7cdd
Kernel/HLE: Service::Interface no longer inherits from any Kernel object, and is now its own standalone class.
Interface is now used by aggregation in ClientPort, to forward service commands to their HLE implementation if needed.
10 years ago
Subv
96df92e98f
fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication.
10 years ago
Subv
302ef594a6
Kernel/IPC: Use Ports and Sessions as the fundamental building block of 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.
10 years ago
Subv
d00d0d61e0
Kernel/Loader: Grab the system mode from the NCCH ExHeader.
3dsx and elf files default to system mode 2 (96MB allocated to the application).
This allows Home Menu to boot without modifications.
Closes #1849
9 years ago
Subv
bb93931096
Kernel/Events: Log an error when trying to create Pulse events and timers.
Related to #1904
9 years ago
Ricardo de Almeida Gonzaga
07fdcf150d
Fix typos
9 years ago
wwylele
1dedb87851
move ResetType to kernel.h
10 years ago
wwylele
8b25c12ce8
implement wait tree widget
10 years ago
Yuri Kunde Schlesner
fa5d9d8266
Use negative priorities to avoid special-casing the self-include
9 years ago
Emmanuel Gil Peyrot
1138ec0d49
Remove empty newlines in #include blocks.
This makes clang-format useful on those.
Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
9 years ago
Yuri Kunde Schlesner
1e4a5da9f4
Manually tweak source formatting and then re-run clang-format
9 years ago
Emmanuel Gil Peyrot
628ed4376a
Sources: Run clang-format on everything.
9 years ago
bunnei
acdc361fc0
arm: ResetContext shouldn't be part of ARM_Interface.
9 years ago
Lectem
7df4925923
fix #1942 and adds a few IPC functions for descriptors
10 years ago
Subv
a350b5274f
Kernel/SVC: Implemented svcCreatePort.
10 years ago
Subv
d5f8d90e34
Kernel: Added ClientPort and ServerPort classes.
This is part of an ongoing effort to implement support for multiple processes.
10 years ago
wwylele
1cef298ca9
Thread: update timeout when rerunning WaitSynch
10 years ago
mailwl
1aceb1b912
Fix parameter name in EnableNotification
10 years ago
wwylele
5e5f9b099a
Switch context on the same thread if necessary
10 years ago
MerryMage
1d3892255d
Memory: Added necessary headers and removed unnecessary header
10 years ago
MerryMage
0352176f4c
Kernel/Thread: Remove use of Memory::GetPointer
10 years ago
Jannik Vogel
f39adfffe7
Set fpscr for new threads
10 years ago
Subv
057cc2f94f
Memory: Fixed a regression caused by #1695 and #1689 .
Reserve enough space in the vector that holds the linear heap memory to prevent relocations of the backing memory when growing too much.
Closes #1790
10 years ago
Subv
3421ea5445
HLE/Applets: Give each applet its own block of heap memory, and use that when creating the framebuffer shared memory block.
10 years ago
Subv
d6c25acc6e
Kernel: Account for automatically-allocated shared memories in the amount of used linear heap memory.
10 years ago
Subv
d6223cfecd
Kernel/SharedMemory: Log an error when Map fails.
10 years ago
Subv
54871800a9
Kernel: Implemented shared memory permissions.
10 years ago
Subv
6e4ff1a857
Kernel/Memory: Remove the Shared Memory region from the legacy memory map.
10 years ago
Subv
b53900a6ab
Kernel/SharedMemory: Properly implemented shared memory support.
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.
10 years ago
Subv
b2c771eed7
Kernel/SVC: Fixed the register order for svcCreateMemoryBlock.
R0 is used as the last parameter instead of R4.
10 years ago