Barrelfish
Functions
capability_storage.c File Reference

Functions for capability storage. This was moved here from barrelfish/nameservice_client.c. More...

Functions

errval_t oct_get_capability (const char *key, struct capref *retcap)
 Get a capability from the capability store. More...
 
errval_t oct_put_capability (const char *key, struct capref cap)
 Put a capability to the capability store. More...
 
errval_t oct_sput_capability (const char *key, struct capref cap, char **outkey)
 Put a capability to the capability store with a generated identifier. More...
 
errval_t oct_remove_capability (const char *key)
 Remove a capability from the capability store. More...
 

Detailed Description

Functions for capability storage. This was moved here from barrelfish/nameservice_client.c.

Function Documentation

errval_t oct_get_capability ( const char *  key,
struct capref retcap 
)

Get a capability from the capability store.

Parameters
keyString that identifies the capability
retcapPointer to structure holding capability
errval_t oct_put_capability ( const char *  key,
struct capref  cap 
)

Put a capability to the capability store.

Parameters
keyString that identifies the capability
capThe capability to store
errval_t oct_remove_capability ( const char *  key)

Remove a capability from the capability store.

Parameters
keyString that identifies the capability
errval_t oct_sput_capability ( const char *  key,
struct capref  cap,
char **  outkey 
)

Put a capability to the capability store with a generated identifier.

The server appends a globally unique ID to the key and returns the generated ID as part of retkey. The caller is responsible to free retkey.

Parameters
[in]keyBase key (server appends this with unique ID).
[in]capThe capability to store
[out]retkeyAllocated string of generated unique identifier.