mirror of
https://github.com/citra-mirror/citra.git
synced 2024-08-21 19:03:23 +02:00
ipc_helpers: add PopPID; remove PushCurrentPIDHandle
It doesn't make sense for a service to tell its own PID to a client, and there is no such use case. Also the name "handle" is misleading as the PID is not a handle
This commit is contained in:
parent
19d7324075
commit
e8c95a9a41
@ -128,8 +128,6 @@ public:
|
|||||||
template <typename... O>
|
template <typename... O>
|
||||||
void PushMoveObjects(Kernel::SharedPtr<O>... pointers);
|
void PushMoveObjects(Kernel::SharedPtr<O>... pointers);
|
||||||
|
|
||||||
void PushCurrentPIDHandle();
|
|
||||||
|
|
||||||
[[deprecated]] void PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id);
|
[[deprecated]] void PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id);
|
||||||
void PushStaticBuffer(const std::vector<u8>& buffer, u8 buffer_id);
|
void PushStaticBuffer(const std::vector<u8>& buffer, u8 buffer_id);
|
||||||
|
|
||||||
@ -208,11 +206,6 @@ inline void RequestBuilder::PushMoveObjects(Kernel::SharedPtr<O>... pointers) {
|
|||||||
PushMoveHandles(context->AddOutgoingHandle(std::move(pointers))...);
|
PushMoveHandles(context->AddOutgoingHandle(std::move(pointers))...);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void RequestBuilder::PushCurrentPIDHandle() {
|
|
||||||
Push(CallingPidDesc());
|
|
||||||
Push(u32(0));
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void RequestBuilder::PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id) {
|
inline void RequestBuilder::PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id) {
|
||||||
Push(StaticBufferDesc(size, buffer_id));
|
Push(StaticBufferDesc(size, buffer_id));
|
||||||
Push(buffer_vaddr);
|
Push(buffer_vaddr);
|
||||||
@ -338,6 +331,8 @@ public:
|
|||||||
std::tie(pointers...) = PopObjects<T...>();
|
std::tie(pointers...) = PopObjects<T...>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
u32 PopPID();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Pops the static buffer vaddr
|
* @brief Pops the static buffer vaddr
|
||||||
* @return The virtual address of the buffer
|
* @return The virtual address of the buffer
|
||||||
@ -507,6 +502,11 @@ inline std::tuple<Kernel::SharedPtr<T>...> RequestParser::PopObjects() {
|
|||||||
std::index_sequence_for<T...>{});
|
std::index_sequence_for<T...>{});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline u32 RequestParser::PopPID() {
|
||||||
|
ASSERT(Pop<u32>() == static_cast<u32>(DescriptorType::CallingPid));
|
||||||
|
return Pop<u32>();
|
||||||
|
}
|
||||||
|
|
||||||
inline VAddr RequestParser::PopStaticBuffer(size_t* data_size) {
|
inline VAddr RequestParser::PopStaticBuffer(size_t* data_size) {
|
||||||
const u32 sbuffer_descriptor = Pop<u32>();
|
const u32 sbuffer_descriptor = Pop<u32>();
|
||||||
StaticBufferDescInfo bufferInfo{sbuffer_descriptor};
|
StaticBufferDescInfo bufferInfo{sbuffer_descriptor};
|
||||||
|
Loading…
Reference in New Issue
Block a user