aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/server_session.cpp
AgeCommit message (Collapse)Author
2021-05-05hle: kernel: Migrate KSession, KClientSession, and KServerSession to ↵bunnei
KAutoObject.
2021-05-05hle: kernel: Refactor out various KThread std::shared_ptr usage.bunnei
2021-01-28hle: kernel: Recode implementation of KThread to be more accurate.bunnei
2021-01-28core: hle: kernel: Rename Thread to KThread.bunnei
2021-01-11core: hle: kernel: Update KSynchronizationObject.bunnei
2020-12-29hle: kernel: Move ServiceThread ownership to KernelCore.bunnei
- Fixes a circular dependency which prevented threads from being released on shutdown.
2020-12-29hle: kernel: service_thread: Add thread name and take weak_ptr of ServerSession.bunnei
2020-12-28hle: kernel: service_thread: Add parameter for thread pool size.bunnei
2020-12-28core: hle: server_session: Use separate threads for each service connection.bunnei
2020-12-20Merge pull request #5131 from bunnei/scheduler-rewritebunnei
Rewrite Kernel scheduler based on Atmosphere
2020-12-07core: Remove unnecessary enum casts in log callsLioncash
Follows the video core PR. fmt doesn't require casts for enum classes anymore, so we can remove quite a few casts.
2020-12-06hle: kernel: Migrate to KScopedSchedulerLock.bunnei
2020-12-06hle: kernel: Rewrite scheduler implementation based on Mesopshere.bunnei
2020-09-14kernel: Remove all dependencies on the global system instanceLioncash
With this, the kernel finally doesn't depend directly on the global system instance anymore.
2020-07-27core_timing: Make use of uintptr_t to represent user_dataLioncash
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-15core_timing: Make TimedCallback take std::chrono::nanosecondsLioncash
Enforces our desired time units directly with a concrete type.
2020-07-15core_timing: Make use of std::chrono with ScheduleEventLioncash
2020-06-27Clang Format.Fernando Sahmkow
2020-06-27SingleCore: Improve Cycle timing Behavior and replace mutex in global ↵Fernando Sahmkow
scheduler for spinlock.
2020-06-27SVC: Correct SendSyncRequest.Fernando Sahmkow
2020-05-03hle_ipc: Eliminate core memory globalsLioncash
We can just pass the required instances into the constructor of the request, eliminating all usages of the global system accessor.
2020-04-17core: memory: Move to Core::Memory namespace.bunnei
- helpful to disambiguate Kernel::Memory namespace.
2020-02-13Core: Address FeedbackFernando Sahmkow
2020-02-11Kernel: Refactor synchronization to better match REFernando Sahmkow
2020-02-11Kernel: Change WaitObject to Synchronization object. In order to better ↵Fernando Sahmkow
reflect RE.
2019-11-28kernel: Implement a more accurate IPC dispatch.bunnei
2019-11-26core/memory: Migrate over GetPointer()Lioncash
With all of the interfaces ready for migration, it's trivial to migrate over GetPointer().
2019-11-26core: Prepare various classes for memory read/write migrationLioncash
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-25kernel: Fix reference management for client/server session.bunnei
- Fixes shutdown crash and crash in Pokemon SwSh.
2019-11-24kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for ↵bunnei
kernel objects. (#3154) * 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-18HLE/IPC: HLEContext can memorize the client thread and use it for ↵Weiyi Wang
SleepClientThread 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-09kernel/server_session: Remove obsolete TODOsLioncash
These are holdovers from Citra.
2019-04-06kernel/server_session: Return a std::pair from CreateSessionPair()Lioncash
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-01kernel/wait_object: Make ShouldWait() take thread members by pointer-to-constLioncash
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-07kernel/hle_ipc: Convert std::shared_ptr IPC header instances to std::optionalLioncash
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-05kernel/server_session: Make data members privateLioncash
Makes it much nicer to locally reason about server session behavior, as part of its functionality isn't placed around other classes.
2018-12-31core/kernel: Remove unnecessary inclusionsLioncash
Gets rid of a few unnecessary header dependencies in some source files.
2018-10-29hle_ipc: Add member function for querying the existence of a domain headerLioncash
Gets rid of the need to call the getter and then check for null.
2018-10-29hle_ipc: Make GetDomainMessageHeader return a regular pointerLioncash
Nothing requires the shared owner ship here, so we can just return a plain pointer.
2018-10-20kernel/process: Make the handle table per-processLioncash
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-04kernel/thread: Make all instance variables privateLioncash
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-31core/core: Replace includes with forward declarations where applicableLioncash
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-28kernel: Eliminate kernel global stateLioncash
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-15kernel/server_session: Add IsSession() member functionLioncash
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-11server_session: Provide more useful information and don't crash on bad IPC ↵bunnei
request.
2018-08-06client_port: Make all data members privateLioncash
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-31kernel: Remove unnecessary includesLioncash
Removes unnecessary direct dependencies in some headers and also gets rid of indirect dependencies that were being relied on to be included.
2018-07-19thread: Convert ThreadStatus into an enum classLioncash
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-18core/memory, core/hle/kernel: Use std::move where applicableLioncash
Avoids pointless copies
2018-07-02Update clang formatJames Rowe