Commit Graph

439 Commits (61442d6afba2f7528ddf3bbee64e8c2d86a4f4a8)

Author SHA1 Message Date
James Rowe 61442d6afb Merge pull request #2839 from Subv/global_kernel_lock
Kernel/HLE: Use a mutex  to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
8 years ago
bunnei 2bbff9fa96 Merge pull request #2893 from Subv/not_schedule_main_thread
Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
8 years ago
Subv bca8916cea Kernel/HLE: Use a mutex to synchronize access to the HLE kernel state between the cpu thread and any other possible threads that might touch the kernel (network thread, etc).
This mutex is acquired in SVC::CallSVC, ie, as soon as the guest application enters the HLE kernel, and should be acquired by the aforementioned threads before modifying kernel structures.
8 years ago
Subv fa228ca637 Kernel/Threads: Don't immediately switch to the new main thread when loading a new process.
This is necessary for loading multiple processes at the same time.
The main thread will be automatically scheduled when necessary once the scheduler runs.
8 years ago
Subv 65f19b51c4 Warnings: Add UNREACHABLE macros to switches that contemplate all possible values. 8 years ago
Weiyi Wang 045d0b5bbd Merge pull request #2799 from yuriks/virtual-cached-range-flush
Add address conversion functions returning optional, Add function to flush virtual region from rasterizer cache
8 years ago
Sebastian Valle 56d718b2a1 Merge pull request #2793 from Subv/replyandreceive
Kernel/SVC: Partially implemented svcReplyAndReceive
8 years ago
Subv b53fa9514f Kernel/SVC: Pass the current thread as a parameter to ClientSession::SendSyncRequest. 8 years ago
Subv c3c9175a1c Kernel/Sessions: Clean up the list of pending request threads of a session when the client endpoint is closed. 8 years ago
Subv 8feeb81af2 Kernel/ServerSession: Keep track of which threads have issued sync requests. 8 years ago
Yuri Kunde Schlesner e192d417ec Kernel: Implement AcceptSession SVC 8 years ago
Yuri Kunde Schlesner 326e7c7020 Memory: Make PhysicalToVirtualAddress return a boost::optional
And fix a few places in the code to take advantage of that.
8 years ago
Yuri Kunde Schlesner f64d0b3f26 Kernel/IPC: Support translation of null handles
Missed this in my first implementation. Thanks to @wwylele for pointing
out that this was missing.
8 years ago
Weiyi Wang c4f0927a62 Merge pull request #2789 from yuriks/misc-kernel
Trivial no-op additions
8 years ago
Yuri Kunde Schlesner b21dfbb295 Merge pull request #2790 from yuriks/remove-movefrom
Remove ResultVal::MoveFrom
8 years ago
Yuri Kunde Schlesner 723dc644fa ResultVal: Remove MoveFrom()
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
8 years ago
Yuri Kunde Schlesner 90b8d4dd36 Kernel: Add comment about the extended linear heap area 8 years ago
Yuri Kunde Schlesner 0dfafdbe59 Kernel/IPC: Make HLERequestContext usable from outside kernel 8 years ago
Yuri Kunde Schlesner d8f6000f54 Kernel/IPC: Use boost::small_vector for HLE context objects 8 years ago
Yuri Kunde Schlesner 92ca422088 Kernel: Allow clearing request_objects to re-use buffer space
Reduces the necessary allocation to max(in_handles, out_handles) rather
than (in_handles + out_handles).
8 years ago
Yuri Kunde Schlesner 8cb65fe65a Kernel: Basic support for IPC translation for HLE services 8 years ago
Yuri Kunde Schlesner 05fee70211 Kernel: Add methods in HLERequestContext abstracting handle creation 8 years ago
Yuri Kunde Schlesner 20e5abb308 ServiceFramework: Use separate copy of command buffer
Copy the IPC command buffer to/from the request context before/after the
handler is invoked. This is part of a move away from using global data
for handling IPC requests.
8 years ago
Yuri Kunde Schlesner 78398d0978 Merge pull request #2756 from yuriks/service-framework
New service framework
8 years ago
Yuri Kunde Schlesner 838faf147e Session: Remove/add some forward declarations 8 years ago
Yuri Kunde Schlesner d666e01cdf Kernel: Ensure objects are kept alive during ClientSession disconnection
Fixes #2760
8 years ago
Yuri Kunde Schlesner 84c497292a Service: Add new ServiceFramework framework for writing HLE services
The old "Interface" class had a few problems such as using free
functions (Which didn't allow you to write the service handler as if it
were a regular class.) which weren't very extensible. (Only received one
parameter with a pointer to the Interface object.)

The new ServiceFramework aims to solve these problems by working with
member functions and passing a generic context struct as parameter. This
struct can be extended in the future without having to update all
existing service implementations.
8 years ago
Yuri Kunde Schlesner 6dc133c24a Kernel: Remove some unnecessary namespace qualifications 8 years ago
Yuri Kunde Schlesner 6354d08359 Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSession
This allows attaching a HLE handle to a ServerPort at any point after it
is created, allowing port/session creation to be generic between HLE and
regular services.
8 years ago
Yuri Kunde Schlesner e626a520ca HLE: Move SessionRequestHandler from Service:: to Kernel::
Most of the code that works with this is or will be in the kernel, so
it's a more appropriate place for it to be.
8 years ago
Yuri Kunde Schlesner be031989ee Kernel: Move HandleTable to a separate file 8 years ago
Yuri Kunde Schlesner 64ecf81a3c Kernel: Move WaitObject to a separate file
Now that HandleTable doesn't directly depend on WaitObject anymore, this
can be separated from the main kernel.h header.
8 years ago
Yuri Kunde Schlesner 9453223075 Kernel: Removed HandleTable::GetWaitObject
This isn't necessary anymore since plain Get works correctly for
WaitObjects.
8 years ago
Yuri Kunde Schlesner b17754f998 Kernel: Extract dynamic Object pointer cast into its own function 8 years ago
Yuri Kunde Schlesner 2cdb40d709 Kernel: Centralize error definitions in errors.h 8 years ago
Yuri Kunde Schlesner cc566dadd8 Merge pull request #2406 from Subv/session_disconnect
Kernel: Properly update port counters on session disconnection.
8 years ago
Subv 37347bfa38 Kernel/Sessions: Remove the ClientSession::Create function.
It is not meant to be used by anything other than CreateSessionPair.
8 years ago
Subv ce5bc477ca Kernel: Remove a now unused enum and variable regarding a session's status. 8 years ago
Subv ddfabf3133 Kernel: Use a Session object to keep track of the status of a Client/Server session pair.
Reduce the associated port's connection count when a ServerSession is destroyed.
8 years ago
Yuri Kunde Schlesner f18d454eb6 Kernel: Map special regions according to ExHeader
This replaces the hardcoded VRAM/DSP mappings with ones made based on
the ExHeader ARM11 Kernel caps list. While this has no visible effect
for most applications (since they use a standard set of mappings) it
does improve support for system modules and n3DS exclusives.
8 years ago
Yuri Kunde Schlesner b4a93cfdde DSP: Create backing memory for entire DSP RAM
Also move address space mapping out of video_core.
8 years ago
wwylele 85ba60d5ec Timer: restore missing signaled=true from #2421 8 years ago
B3n30 dcf115778a Fix log entry in timer::signal (#2600) 8 years ago
Mat M 0cb52ee74a Doxygen: Amend minor issues (#2593)
Corrects a few issues with regards to Doxygen documentation, for example:

- Incorrect parameter referencing.
- Missing @param tags.
- Typos in @param tags.

and a few minor other issues.
8 years ago
Yuri Kunde Schlesner b250ce21b9 Merge pull request #2587 from yuriks/status-bar
Replace built-in Profiler with indicators in status bar
8 years ago
Yuri Kunde Schlesner 441f8b5a4b Core: Remove unnecessary include in thread.h 8 years ago
Subv 029a11030e Timers: Immediately signal the timer if it was started with an initial value of 0. 8 years ago
Subv 1ddff14511 Threads: Check the process' resource limit for the max allowed priority when creating a thread and remove the priority clamping code. 8 years ago
Subv f2f2572fed Thread: Added priority range checking to svcSetThreadPriority and removed priority clamping code from Thread::SetPriority. 8 years ago
bunnei 84d72fd92f Merge pull request #2397 from Subv/pulse
Kernel: Implemented Pulse event and timers.
8 years ago