20#include "pedigree/kernel/process/Ipc.h"
21#include "pedigree/kernel/process/Process.h"
22#include "pedigree/kernel/process/Thread.h"
23#include "pedigree/kernel/processor/Processor.h"
24#include "pedigree/kernel/utilities/Pair.h"
25#include "pedigree/kernel/utilities/String.h"
26#include "pedigree/kernel/utilities/Tree.h"
27#include "pedigree/native/ipc/Ipc.h"
29#include <native-ipc.h>
37static inline uint64_t getPid() {
48 "Inserting an already allocated IPC message "
49 "[createStandardMessage].");
51 __msg_lookup.insert(p, pKernelMessage);
53 return reinterpret_cast<uintptr_t
>(pKernelMessage->
getBuffer());
60 __msg_lookup.insert(p, pKernelMessage);
62 return reinterpret_cast<uintptr_t
>(pKernelMessage->
getBuffer());
80 __msg_lookup.remove(p);
81 delete pKernelMessage;
90 return Ipc::send(
reinterpret_cast<Ipc::IpcEndpoint*
>(pEndpoint), pKernelMessage, bAsync);
96void* recvIpcPhase1(PedigreeIpc::IpcEndpoint pEndpoint,
bool bAsync) {
98 bool ret = Ipc::recv(
reinterpret_cast<Ipc::IpcEndpoint*
>(pEndpoint), &pMessage, bAsync);
102 return reinterpret_cast<void*
>(pMessage);
111 FATAL(
"Inserting an already allocated IPC message [recvIpcPhase2].");
113 __msg_lookup.insert(p, pKernelMessage);
115 return reinterpret_cast<uintptr_t
>(pKernelMessage->
getBuffer());
118void createEndpoint(
const char* name) {
120 Ipc::createEndpoint(temp);
123void removeEndpoint(
const char* name) {
125 Ipc::removeEndpoint(temp);
128PedigreeIpc::IpcEndpoint* getEndpoint(
const char* name) {
130 return reinterpret_cast<PedigreeIpc::IpcEndpoint*
>(Ipc::getEndpoint(temp));
A standard IPC message that is less than 4 KB in size.
static ProcessorInformation & information()