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/native/ipc/Ipc.h" 26 #include "pedigree/kernel/utilities/Pair.h" 27 #include "pedigree/kernel/utilities/String.h" 28 #include "pedigree/kernel/utilities/Tree.h" 30 #include <native-ipc.h> 39 static inline uint64_t getPid()
52 FATAL(
"Inserting an already allocated IPC message " 53 "[createStandardMessage].");
55 __msg_lookup.
insert(p, pKernelMessage);
57 return reinterpret_cast<uintptr_t
>(pKernelMessage->
getBuffer());
60 uintptr_t createSharedMessage(
66 __msg_lookup.
insert(p, pKernelMessage);
68 return reinterpret_cast<uintptr_t
>(pKernelMessage->
getBuffer());
90 delete pKernelMessage;
104 reinterpret_cast<Ipc::IpcEndpoint *>(pEndpoint), pKernelMessage,
111 void *recvIpcPhase1(PedigreeIpc::IpcEndpoint *pEndpoint,
bool bAsync)
114 bool ret = Ipc::recv(
115 reinterpret_cast<Ipc::IpcEndpoint *>(pEndpoint), &pMessage, bAsync);
119 return reinterpret_cast<void *
>(pMessage);
131 FATAL(
"Inserting an already allocated IPC message [recvIpcPhase2].");
133 __msg_lookup.
insert(p, pKernelMessage);
135 return reinterpret_cast<uintptr_t
>(pKernelMessage->
getBuffer());
138 void createEndpoint(
const char *name)
141 Ipc::createEndpoint(temp);
144 void removeEndpoint(
const char *name)
147 Ipc::removeEndpoint(temp);
150 PedigreeIpc::IpcEndpoint *getEndpoint(
const char *name)
153 return reinterpret_cast<PedigreeIpc::IpcEndpoint *
>(Ipc::getEndpoint(temp));
static ProcessorInformation & information()
A standard IPC message that is less than 4 KB in size.
void insert(const K &key, const E &value)
void remove(const K &key)
E lookup(const K &key) const