Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2022-06-14 | common: Change semantics of UNREACHABLE to unconditionally crash | Liam | 1 | -2/+2 | |
2022-04-23 | general: Convert source file copyright comments over to SPDX | Morph | 1 | -3/+2 | |
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later. | |||||
2022-04-08 | hle: kernel: Unify and integrate reference tracking for KServerPort/KServerSession. | bunnei | 1 | -0/+3 | |
- These are not managed elsewhere, and need to be tracked and closed on emulation shutdown. | |||||
2022-03-15 | core: hle: kernel: Remove server session tracking. | bunnei | 1 | -4/+1 | |
- These are now allocated/managed by emulated memory, so we do not need to track and free them on shutdown. | |||||
2022-03-15 | core: hle: kernel: k_server_session: Ensure SessionRequestManager is freed. | bunnei | 1 | -0/+3 | |
2022-03-15 | core: hle: kernel: Use weak_ptr where possible for SessionRequestHandler and SessionRequestManager. | bunnei | 1 | -1/+6 | |
2022-01-21 | hle: kernel: KServerSession: Remove hack for CompleteSyncRequest. | bunnei | 1 | -11/+0 | |
- This does not appear to be necessary anymore. | |||||
2022-01-21 | hle: kernel: KServerSession: Simplify CompleteSyncRequest EndWait. | bunnei | 1 | -7/+2 | |
- Considering is_thread_waiting is never set, so we can remove IsThreadWaiting. - KThread::EndWait will take the scheduler lock, so we can remove the redundant lock. | |||||
2021-12-07 | hle: kernel: KServerSession: Migrate to updated KThreadQueue. | bunnei | 1 | -2/+1 | |
2021-12-07 | hle: kernel: KThread: Remove tracking of sync object from threads. | bunnei | 1 | -1/+1 | |
2021-11-04 | core: Fix transitive include build errors | ameerj | 1 | -0/+1 | |
2021-11-04 | core: Remove unused includes | ameerj | 1 | -1/+0 | |
2021-07-21 | hle: kernel: Track and release server sessions, and protect methods with locks. | bunnei | 1 | -1/+4 | |
2021-06-08 | hle: kernel: KServerSession: Work-around scenario where session is closed too early. | bunnei | 1 | -7/+24 | |
2021-06-08 | hle: kernel: hle_ipc: Ensure SessionRequestHandler is valid. | bunnei | 1 | -4/+9 | |
2021-06-08 | hle: kernel: Remove service thread manager and use weak_ptr. | bunnei | 1 | -1/+1 | |
- We no longer need to queue up service threads to be destroyed. - Fixes a race condition where a thread could be destroyed too early, which caused a crash in Pokemon Sword/Shield. | |||||
2021-06-07 | hle: kernel: KServerSession: Use ASSERT_MSG where appropriate. | bunnei | 1 | -1/+1 | |
2021-06-07 | hle: kernel: k_server_session: Return service thread by strong pointer. | bunnei | 1 | -1/+1 | |
2021-06-07 | hle: kernel: k_server_session: Ensure service thread is valid before dereference. | bunnei | 1 | -1/+3 | |
2021-06-07 | hle: kernel: KAutoObjectWithListContainer: Use boost::instrusive::rbtree. | bunnei | 1 | -2/+2 | |
- Fixes some crashes introduced by our common intrusive red/black tree impl. | |||||
2021-06-05 | hle: kernel: Refactor to allocate a ServiceThread per service handler. | bunnei | 1 | -8/+13 | |
- Previously, we would allocate a thread per session, which adds new threads on CloneCurrentObject. - This results in race conditions with N sessions queuing requests to the same service interface. - Fixes Pokken Tournament DX crashes/softlocks, which were regressed by #6347. | |||||
2021-06-02 | general: Replace RESULT_SUCCESS with ResultSuccess | Morph | 1 | -8/+8 | |
Transition to PascalCase for result names. | |||||
2021-05-21 | hle: kernel: Implement CloneCurrentObject and improve session management. | bunnei | 1 | -20/+15 | |
2021-05-11 | hle: service: Implement IPC::CommandType::Close. | bunnei | 1 | -2/+2 | |
- This was not actually closing sessions before. | |||||
2021-05-08 | kernel: Eliminate variable shadowing | Lioncash | 1 | -1/+1 | |
Now that the large kernel refactor is merged, we can eliminate the remaining variable shadowing cases. | |||||
2021-05-06 | hle: kernel: Migrate to KHandleTable. | bunnei | 1 | -1/+1 | |
2021-05-06 | hle: kernel: Rename Process to KProcess. | bunnei | 1 | -1/+1 | |
2021-05-06 | hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject. | bunnei | 1 | -1/+1 | |
2021-05-06 | hle: kernel: Migrate KClientPort to KAutoObject. | bunnei | 1 | -1/+1 | |
2021-05-06 | hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. | bunnei | 1 | -29/+36 | |
2021-05-06 | hle: kernel: Refactor out various KThread std::shared_ptr usage. | bunnei | 1 | -18/+5 | |
2021-01-29 | hle: kernel: Recode implementation of KThread to be more accurate. | bunnei | 1 | -1/+1 | |
2021-01-29 | core: hle: kernel: Rename Thread to KThread. | bunnei | 1 | -3/+3 | |
2021-01-11 | core: hle: kernel: Update KSynchronizationObject. | bunnei | 1 | -21/+2 | |
2020-12-29 | hle: kernel: Move ServiceThread ownership to KernelCore. | bunnei | 1 | -3/+10 | |
- Fixes a circular dependency which prevented threads from being released on shutdown. | |||||
2020-12-29 | hle: kernel: service_thread: Add thread name and take weak_ptr of ServerSession. | bunnei | 1 | -1/+1 | |
2020-12-29 | hle: kernel: service_thread: Add parameter for thread pool size. | bunnei | 1 | -1/+1 | |
2020-12-29 | core: hle: server_session: Use separate threads for each service connection. | bunnei | 1 | -16/+4 | |
2020-12-08 | core: Remove unnecessary enum casts in log calls | Lioncash | 1 | -2/+1 | |
Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts. | |||||
2020-12-06 | hle: kernel: Migrate to KScopedSchedulerLock. | bunnei | 1 | -1/+1 | |
2020-12-06 | hle: kernel: Rewrite scheduler implementation based on Mesopshere. | bunnei | 1 | -1/+1 | |
2020-09-14 | kernel: Remove all dependencies on the global system instance | Lioncash | 1 | -3/+3 | |
With this, the kernel finally doesn't depend directly on the global system instance anymore. | |||||
2020-07-28 | core_timing: Make use of uintptr_t to represent user_data | Lioncash | 1 | -2/+4 | |
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly. | |||||
2020-07-16 | core_timing: Make TimedCallback take std::chrono::nanoseconds | Lioncash | 1 | -1/+1 | |
Enforces our desired time units directly with a concrete type. | |||||
2020-07-16 | core_timing: Make use of std::chrono with ScheduleEvent | Lioncash | 1 | -2/+2 | |
2020-06-27 | Clang Format. | Fernando Sahmkow | 1 | -1/+1 | |
2020-06-27 | SingleCore: Improve Cycle timing Behavior and replace mutex in global scheduler for spinlock. | Fernando Sahmkow | 1 | -1/+2 | |
2020-06-27 | SVC: Correct SendSyncRequest. | Fernando Sahmkow | 1 | -5/+10 | |
2020-05-03 | hle_ipc: Eliminate core memory globals | Lioncash | 1 | -2/+2 | |
We can just pass the required instances into the constructor of the request, eliminating all usages of the global system accessor. | |||||
2020-04-17 | core: memory: Move to Core::Memory namespace. | bunnei | 1 | -2/+3 | |
- helpful to disambiguate Kernel::Memory namespace. | |||||
2020-02-14 | Core: Address Feedback | Fernando Sahmkow | 1 | -1/+1 | |
2020-02-11 | Kernel: Refactor synchronization to better match RE | Fernando Sahmkow | 1 | -0/+10 | |
2020-02-11 | Kernel: Change WaitObject to Synchronization object. In order to better reflect RE. | Fernando Sahmkow | 1 | -1/+1 | |
2019-11-28 | kernel: Implement a more accurate IPC dispatch. | bunnei | 1 | -74/+43 | |
2019-11-27 | core/memory: Migrate over GetPointer() | Lioncash | 1 | -1/+2 | |
With all of the interfaces ready for migration, it's trivial to migrate over GetPointer(). | |||||
2019-11-27 | core: Prepare various classes for memory read/write migration | Lioncash | 1 | -1/+2 | |
Amends a few interfaces to be able to handle the migration over to the new Memory class by passing the class by reference as a function parameter where necessary. Notably, within the filesystem services, this eliminates two ReadBlock() calls by using the helper functions of HLERequestContext to do that for us. | |||||
2019-11-26 | kernel: Fix reference management for client/server session. | bunnei | 1 | -9/+9 | |
- Fixes shutdown crash and crash in Pokemon SwSh. | |||||
2019-11-25 | kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. (#3154) | bunnei | 1 | -7/+8 | |
* kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for kernel objects. - See https://github.com/citra-emu/citra/pull/4710 for details. | |||||
2019-05-18 | HLE/IPC: HLEContext can memorize the client thread and use it for SleepClientThread | Weiyi Wang | 1 | -1/+1 | |
This reduces the boilerplate that services have to write out the current thread explicitly. Using current thread instead of client thread is also semantically incorrect, and will be a problem when we implement multicore (at which time there will be multiple current threads) | |||||
2019-04-10 | kernel/server_session: Remove obsolete TODOs | Lioncash | 1 | -7/+2 | |
These are holdovers from Citra. | |||||
2019-04-06 | kernel/server_session: Return a std::pair from CreateSessionPair() | Lioncash | 1 | -1/+1 | |
Keeps the return type consistent with the function name. While we're at it, we can also reduce the amount of boilerplate involved with handling these by using structured bindings. | |||||
2019-04-02 | kernel/wait_object: Make ShouldWait() take thread members by pointer-to-const | Lioncash | 1 | -1/+1 | |
Given this is intended as a querying function, it doesn't make sense to allow the implementer to modify the state of the given thread. | |||||
2019-03-08 | kernel/hle_ipc: Convert std::shared_ptr IPC header instances to std::optional | Lioncash | 1 | -31/+32 | |
There's no real need to use a shared lifetime here, since we don't actually expose them to anything else. This is also kind of an unnecessary use of the heap given the objects themselves are so small; small enough, in fact that changing over to optionals actually reduces the overall size of the HLERequestContext struct (818 bytes to 808 bytes). | |||||
2019-03-06 | kernel/server_session: Make data members private | Lioncash | 1 | -0/+28 | |
Makes it much nicer to locally reason about server session behavior, as part of its functionality isn't placed around other classes. | |||||
2019-01-01 | core/kernel: Remove unnecessary inclusions | Lioncash | 1 | -0/+1 | |
Gets rid of a few unnecessary header dependencies in some source files. | |||||
2018-10-30 | hle_ipc: Add member function for querying the existence of a domain header | Lioncash | 1 | -1/+1 | |
Gets rid of the need to call the getter and then check for null. | |||||
2018-10-30 | hle_ipc: Make GetDomainMessageHeader return a regular pointer | Lioncash | 1 | -1/+1 | |
Nothing requires the shared owner ship here, so we can just return a plain pointer. | |||||
2018-10-20 | kernel/process: Make the handle table per-process | Lioncash | 1 | -2/+1 | |
In the kernel, there isn't a singular handle table that everything gets tossed into or used, rather, each process gets its own handle table that it uses. This currently isn't an issue for us, since we only execute one process at the moment, but we may as well get this out of the way so it's not a headache later on. | |||||
2018-10-04 | kernel/thread: Make all instance variables private | Lioncash | 1 | -2/+2 | |
Many of the member variables of the thread class aren't even used outside of the class itself, so there's no need to make those variables public. This change follows in the steps of the previous changes that made other kernel types' members private. The main motivation behind this is that the Thread class will likely change in the future as emulation becomes more accurate, and letting random bits of the emulator access data members of the Thread class directly makes it a pain to shuffle around and/or modify internals. Having all data members public like this also makes it difficult to reason about certain bits of behavior without first verifying what parts of the core actually use them. Everything being public also generally follows the tendency for changes to be introduced in completely different translation units that would otherwise be better introduced as an addition to the Thread class' public interface. | |||||
2018-08-31 | core/core: Replace includes with forward declarations where applicable | Lioncash | 1 | -3/+3 | |
The follow-up to e2457418dae19b889b2ad85255bb95d4cd0e4bff, which replaces most of the includes in the core header with forward declarations. This makes it so that if any of the headers the core header was previously including change, then no one will need to rebuild the bulk of the core, due to core.h being quite a prevalent inclusion. This should make turnaround for changes much faster for developers. | |||||
2018-08-29 | kernel: Eliminate kernel global state | Lioncash | 1 | -8/+9 | |
As means to pave the way for getting rid of global state within core, This eliminates kernel global state by removing all globals. Instead this introduces a KernelCore class which acts as a kernel instance. This instance lives in the System class, which keeps its lifetime contained to the lifetime of the System class. This also forces the kernel types to actually interact with the main kernel instance itself instead of having transient kernel state placed all over several translation units, keeping everything together. It also has a nice consequence of making dependencies much more explicit. This also makes our initialization a tad bit more correct. Previously we were creating a kernel process before the actual kernel was initialized, which doesn't really make much sense. The KernelCore class itself follows the PImpl idiom, which allows keeping all the implementation details sealed away from everything else, which forces the use of the exposed API and allows us to avoid any unnecessary inclusions within the main kernel header. | |||||
2018-08-15 | kernel/server_session: Add IsSession() member function | Lioncash | 1 | -1/+1 | |
Allows querying the inverse of IsDomain() to make things more readable. This will likely also be usable in the event of implementing ConvertDomainToSession(). | |||||
2018-08-12 | server_session: Provide more useful information and don't crash on bad IPC request. | bunnei | 1 | -0/+8 | |
2018-08-07 | client_port: Make all data members private | Lioncash | 1 | -1/+1 | |
These members don't need to be entirely exposed, we can instead expose an API to operate on them without directly needing to mutate them We can also guard against overflow/API misuse this way as well, given active_sessions is an unsigned value. | |||||
2018-07-31 | kernel: Remove unnecessary includes | Lioncash | 1 | -0/+2 | |
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included. | |||||
2018-07-20 | thread: Convert ThreadStatus into an enum class | Lioncash | 1 | -2/+2 | |
Makes the thread status strongly typed, so implicit conversions can't happen. It also makes it easier to catch mistakes at compile time. | |||||
2018-07-19 | core/memory, core/hle/kernel: Use std::move where applicable | Lioncash | 1 | -1/+2 | |
Avoids pointless copies | |||||
2018-07-03 | Update clang format | James Rowe | 1 | -1/+1 | |
2018-07-03 | Rename logging macro back to LOG_* | James Rowe | 1 | -2/+2 | |
2018-05-02 | general: Make formatting of logged hex values more straightforward | Lioncash | 1 | -1/+1 | |
This makes the formatting expectations more obvious (e.g. any zero padding specified is padding that's entirely dedicated to the value being printed, not any pretty-printing that also gets tacked on). | |||||
2018-05-02 | ipc: Add support for PopIpcInterface() method. | bunnei | 1 | -0/+3 | |
- This can be used for domain objects as inputs to service functions. | |||||
2018-04-26 | kernel: Migrate logging macros to fmt-compatible ones | Lioncash | 1 | -3/+3 | |
2018-03-19 | Clang Fixes | N00byKing | 1 | -1/+2 | |
2018-03-19 | Clean Warnings (?) | N00byKing | 1 | -1/+1 | |
2018-03-14 | core: Move process creation out of global state. | bunnei | 1 | -1/+2 | |
2018-02-20 | Fix: change check for domain order and existance of domain message header | mailwl | 1 | -1/+1 | |
2018-02-20 | IPC: add domain header to response if only it exists in request | mailwl | 1 | -1/+1 | |
2018-02-18 | Kernel/IPC: Add a small delay after each SyncRequest to prevent thread starvation. | Subv | 1 | -41/+56 | |
Ported from citra PR #3091 The delay specified here is from a Nintendo 3DS, and should be measured in a Nintendo Switch. This change is enough to prevent Puyo Puyo Tetris's main thread starvation. | |||||
2018-01-25 | server_session: Fix scenario where all domain handlers are closed. | bunnei | 1 | -3/+3 | |
2018-01-25 | hle: Rename RequestBuilder to ResponseBuilder. | bunnei | 1 | -1/+1 | |
2018-01-25 | hle: Integrate Domain handling into ServerSession. | bunnei | 1 | -5/+42 | |
2017-12-29 | kernel: Fix implementation of ConvertSessionToDomain. | bunnei | 1 | -2/+9 | |
2017-11-01 | service: Return proper result code for IPC::CommandType::Close. | bunnei | 1 | -5/+6 | |
2017-06-25 | Kernel/ServerSession: Keep track of which threads have issued sync requests. | Subv | 1 | -6/+16 | |
2017-06-19 | ResultVal: Remove MoveFrom() | Yuri Kunde Schlesner | 1 | -1/+1 | |
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in case you already have an rvalue. | |||||
2017-06-06 | Kernel: Add a dedicated SetHleHandler method to ServerPort/ServerSession | Yuri Kunde Schlesner | 1 | -11/+5 | |
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. | |||||
2017-06-06 | HLE: Move SessionRequestHandler from Service:: to Kernel:: | Yuri Kunde Schlesner | 1 | -2/+5 | |
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. | |||||
2017-05-22 | Kernel/Sessions: Remove the ClientSession::Create function. | Subv | 1 | -1/+3 | |
It is not meant to be used by anything other than CreateSessionPair. | |||||
2017-05-15 | Kernel: Use a Session object to keep track of the status of a Client/Server session pair. | Subv | 1 | -7/+22 | |
Reduce the associated port's connection count when a ServerSession is destroyed. | |||||
2017-01-04 | Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter. | Subv | 1 | -3/+3 | |
This will be useful when implementing mutex priority inheritance. | |||||
2016-12-14 | Fixed the codestyle to match our clang-format rules. | Subv | 1 | -10/+15 | |
2016-12-09 | Moved the HLE command buffer translation task to ServerSession instead of the HLE handler superclass. | Subv | 1 | -2/+13 | |
2016-12-08 | Added a framework for partially handling Session disconnections. | Subv | 1 | -2/+8 | |
Further implementation will happen in a future commit. Fixes a regression. | |||||
2016-12-08 | Use std::move where appropriate. | Subv | 1 | -3/+4 | |
2016-12-05 | KServerPorts now have an HLE handler "template", which is inherited by all ServerSessions created from it. | Subv | 1 | -3/+3 | |
2016-12-03 | Declare empty ServerSession and ClientSession constructors as default. | Subv | 1 | -2/+2 | |
2016-12-01 | Fixed the rebase mistakes. | Subv | 1 | -1/+0 | |
2016-12-01 | A bit of a redesign. | Subv | 1 | -13/+12 | |
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-12-01 | fixup! Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication. | Subv | 1 | -1/+1 | |
2016-12-01 | Kernel/IPC: Use Ports and Sessions as the fundamental building block of Inter Process Communication. | Subv | 1 | -0/+58 | |
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. |