ameerj
e17c343915
hle_ipc: Add ReadBufferSpan function
...
Returns a std::span to the buffer address, rather than create a copy of the memory into a std::vector
2022-12-25 13:20:59 -05:00
Lioncash
ff19204dc6
hle_ipc: Add helper functions for getting number of buffer elements
2022-11-23 13:15:19 -05:00
Lioncash
ce329764a2
hle_ipc: Mark relevant member functions as [[nodiscard]]
...
Will allow the compiler to complain about cases where ignoring the
return value would be a bug.
2022-11-23 13:08:52 -05:00
Liam
0fc08006e5
service_thread: fix deletion
2022-11-06 19:50:51 -05:00
Liam
2e56a382a9
kernel: invert session request handling flow
2022-10-31 17:44:06 -04:00
Morph
89ace6c367
concepts: Use the std::contiguous_iterator concept
...
This also covers std::span, which does not have a const iterator.
Also renames IsSTLContainer to IsContiguousContainer to explicitly convey its semantics.
2022-10-26 00:41:54 -04:00
Liam
c0ae56548e
kernel: remove most SessionRequestManager handling from KServerSession
2022-10-19 16:31:12 -04:00
Liam
09777eea76
kernel: remove KWritableEvent
2022-10-12 20:29:29 -04:00
Kelebek1
be1f5f1d9f
Project Andio
2022-07-22 01:11:32 +01:00
german77
c7890ebccc
core: Replace all instances of ResultCode with Result
2022-06-26 20:21:37 -05:00
Liam
c1771c98f3
common: Change semantics of UNREACHABLE to unconditionally crash
2022-06-13 20:09:00 -04:00
Morph
2b87305d31
general: Convert source file copyright comments over to SPDX
...
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-23 05:55:32 -04:00
bunnei
75e39568a0
hle: service: Add option for service interfaces to create or use the default thread.
2022-04-02 01:24:30 -04:00
bunnei
8421193857
core: hle: kernel: Use weak_ptr where possible for SessionRequestHandler and SessionRequestManager.
2022-03-14 18:14:53 -07:00
bunnei
af11abed3f
hle: kernel: KServerSession: Simplify CompleteSyncRequest EndWait.
...
- 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.
2022-01-20 17:08:00 -08:00
Morph
6bc7f27655
kernel: hle_ipc: Foward declare KAutoObject
2021-10-07 13:32:36 -04:00
bunnei
4ad8a148ee
hle: kernel: hle_ipc: Ensure SessionRequestHandler is valid.
2021-06-07 21:55:37 -07:00
bunnei
a3de201dcf
hle: kernel: Remove service thread manager and use weak_ptr.
...
- 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 21:10:51 -07:00
bunnei
ff57fd7281
hle: kernel: k_server_session: Return service thread by strong pointer.
2021-06-06 17:54:06 -07:00
bunnei
8bf7b19d1d
hle: kernel: Refactor to allocate a ServiceThread per service handler.
...
- 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-04 19:26:48 -07:00
bunnei
14f50729e2
hle: kernel: hle_ipc: Simplify incoming/outgoing move/copy/domain objects.
2021-05-20 21:41:52 -07:00
bunnei
6e3c9d2b06
hle: kernel: Implement CloneCurrentObject and improve session management.
2021-05-20 21:41:49 -07:00
Morph
29ce6e48ed
hle_ipc: Add a getter for PID
2021-05-16 04:10:42 -04:00
bunnei
006a51c86b
hle: kernel: hle_ipc: Fix outgoing IPC response size calculation.
2021-05-11 12:27:43 -07:00
bunnei
232102c794
hle: kernel: hle_ipc: Improve IPC code and add initial support for TIPC.
...
- Fixes our move handles implementation to actually move objects.
- Simplifies the traditional IPC path.
2021-05-10 20:34:38 -07:00
bunnei
4a781928dd
hle: kernel: Further cleanup and add TIPC helpers.
2021-05-10 15:05:10 -07:00
bunnei
ae86003503
hle: ipc_helpers: Update IPC response generation for TIPC.
2021-05-10 15:05:10 -07:00
Lioncash
e019da0487
kernel: Eliminate variable shadowing
...
Now that the large kernel refactor is merged, we can eliminate the
remaining variable shadowing cases.
2021-05-08 12:33:26 -04:00
bunnei
47224d3864
hle: kernel: Migrate to KHandleTable.
2021-05-05 16:40:53 -07:00
bunnei
ad048de3d6
hle: kernel: Rename Process to KProcess.
2021-05-05 16:40:52 -07:00
bunnei
796dddf78f
hle: kernel: Remove deprecated Object class.
2021-05-05 16:40:52 -07:00
bunnei
d6844cf75f
hle: kernel: Migrate KPort, KClientPort, and KServerPort to KAutoObject.
2021-05-05 16:40:52 -07:00
bunnei
944eb14d69
hle: kernel: HandleTable: Remove deprecated APIs.
2021-05-05 16:40:52 -07:00
bunnei
83b96b7264
hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject.
2021-05-05 16:40:51 -07:00
bunnei
8b224f05c9
hle: kernel: Refactor IPC interfaces to not use std::shared_ptr.
2021-05-05 16:40:50 -07:00
bunnei
a4a27a1ef2
hle: kernel: Migrate more of KThread to KAutoObject.
2021-05-05 16:40:50 -07:00
bunnei
07939c59a6
hle: kernel: Refactor out various KThread std::shared_ptr usage.
2021-05-05 16:40:50 -07:00
Morph
e1702e2844
hle_ipc: Add helper functions to get copy/move handles
2021-04-15 01:53:16 -04:00
bunnei
80d0eb3bbd
hle: kernel: Rename WritableEvent to KWritableEvent.
2021-02-05 14:00:36 -08:00
bunnei
284a4d9283
hle: kernel: Rename ReadableEvent to KReadableEvent.
2021-02-05 14:00:36 -08:00
bunnei
f34dd04d09
hle: kernel: Recode implementation of KThread to be more accurate.
2021-01-28 21:42:26 -08:00
bunnei
3d70b4a4ea
core: hle: kernel: Rename Thread to KThread.
2021-01-28 21:42:25 -08:00
Morph
afa0d5efb3
hle_ipc: Add Can(Read, Write)Buffer
...
Allows us to test whether a buffer can be read from or written to memory
2021-01-28 01:32:24 -05:00
bunnei
846f35c4ad
hle: kernel: hle_ipc: Remove SleepClientThread.
...
- This was kind of hacky, and no longer is necessary with service threads.
2020-12-28 16:33:48 -08:00
Lioncash
e7fe020ace
ipc_helpers: Remove usage of the global system instance
...
Resolves numerous deprecation warnings throughout the codebase due to
inclusion of this header. Now building core should be significantly less
noisy (and also relying on less global state).
This also uncovered quite a few modules that were relying on indirect
includes, which have also been fixed.
2020-11-08 15:58:11 -05:00
David
ecaac59acd
ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer ( #4465 )
...
* ipc: Allow all trivially copyable objects to be passed directly into WriteBuffer
With the support of C++20, we can use concepts to deduce if a type is an STL container or not.
* More agressive concept for stl containers
* Add -fconcepts
* Move to common namespace
* Add Common::IsBaseOf
2020-08-03 07:28:54 -04:00
Lioncash
ccfac6d992
hle_ipc: Eliminate core memory globals
...
We can just pass the required instances into the constructor of the
request, eliminating all usages of the global system accessor.
2020-05-03 12:57:40 -04:00
Lioncash
f8fe53c9f9
hle_ipc: Remove std::size_t casts where applicable
...
These were added in the change that enabled -Wextra on linux builds so
as not to introduce interface changes in the same change as a
build-system flag addition.
Now that the flags are enabled, we can freely change the interface to
make these unnecessary.
2020-04-16 22:02:10 -04:00
bunnei
4a4516868c
kernel: Implement a more accurate IPC dispatch.
2019-11-28 12:01:53 -05:00
bunnei
5cb0f276fe
kernel: Replace usage of boost::intrusive_ptr with std::shared_ptr for 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-11-24 20:15:51 -05:00