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:
wwylele 2018-02-15 11:16:41 +02:00
parent 19d7324075
commit e8c95a9a41
1 changed files with 7 additions and 7 deletions

View File

@ -128,8 +128,6 @@ public:
template <typename... O>
void PushMoveObjects(Kernel::SharedPtr<O>... pointers);
void PushCurrentPIDHandle();
[[deprecated]] void PushStaticBuffer(VAddr buffer_vaddr, size_t size, 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))...);
}
inline void RequestBuilder::PushCurrentPIDHandle() {
Push(CallingPidDesc());
Push(u32(0));
}
inline void RequestBuilder::PushStaticBuffer(VAddr buffer_vaddr, size_t size, u8 buffer_id) {
Push(StaticBufferDesc(size, buffer_id));
Push(buffer_vaddr);
@ -338,6 +331,8 @@ public:
std::tie(pointers...) = PopObjects<T...>();
}
u32 PopPID();
/**
* @brief Pops the static buffer vaddr
* @return The virtual address of the buffer
@ -507,6 +502,11 @@ inline std::tuple<Kernel::SharedPtr<T>...> RequestParser::PopObjects() {
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) {
const u32 sbuffer_descriptor = Pop<u32>();
StaticBufferDescInfo bufferInfo{sbuffer_descriptor};