Go to the documentation of this file.
57 ERROR(
"invalid buffer size: " << msg->
size);
66 ERROR(
"failed to retrieve buffer mapping table for PID " << msg->
from);
72 msg->
key[
sizeof(msg->
key) - 1] = 0;
92 ERROR(
"failed to allocate buffer `" << msg->
key <<
"' in PID " <<
93 msg->
from <<
": " << (
int) mapResult);
101 ERROR(
"failed to add buffer `" << msg->
key <<
"' to mapping table for PID " << msg->
from);
111 DEBUG(
"mapped `" << msg->
key <<
"' for PID " << msg->
from <<
" at " <<
112 (
void *) msg->
address <<
" / " << (
void *) range.
phys);
Efficient key -> value lookups.
HashTable< String, Address > * getBufferTable(const ProcessID pid)
Retrieve current buffer table for given ProcessID.
Result
Enumeration of generic kernel API result codes.
void registerBuffer(DatastoreMessage *msg)
Add a new buffer.
u32 ProcessID
Process Identification Number.
Address address
Address of mapped buffer inside client process.
unsigned long Address
A memory address.
API::Result VMCtl(const ProcessID procID, const MemoryOperation op, Memory::Range *range=ZERO)
Prototype for user applications.
Datastore::Result result
Result of action.
static const Size MaximumBufferSize
Maximum size of a single buffer.
#define DEBUG(msg)
Output a debug message to standard output.
DatastoreServer()
Class constructor function.
ProcessID from
Source of the message.
Address phys
Physical address.
virtual const V * get(const K &key) const
Returns the first value for the given key.
HashTable< ProcessID, HashTable< String, Address > * > m_buffers
Per-process hash table with key to buffers mapping.
#define NULL
NULL means zero.
char key[32]
Key specifies the buffer to use.
Template class which serves incoming messages from Channels using MessageHandlers.
#define ERROR(msg)
Output an error message.
void addIPCHandler(const Size slot, IPCHandlerFunction h, const bool sendReply=true)
Register a new IPC message action handler.
Address virt
Virtual address.
Size size
Size of the buffer.
Size size
Size in number of bytes.
Access access
Page access flags.
virtual bool insert(const K &key, const V &value)
Inserts the given item to the HashTable.