Introduction   User API Reference   DSMlib Reference   IDL Interface   File List   Index  

Dataspace Management
[Dataspace Manager Server Support Library]


Data Structures

struct  dsmlib_ds_desc

Defines

#define dsmlib_get_id(ds)   ((ds)->id)

Typedefs

typedef struct dsmlib_ds_desc dsmlib_ds_desc_t

Functions

L4_CV dsmlib_ds_desc_tdsmlib_create_dataspace (void)
 Create new dataspace.
L4_CV void dsmlib_release_dataspace (dsmlib_ds_desc_t *ds)
 Release dataspace.
L4_CV dsmlib_ds_desc_tdsmlib_get_dataspace (l4_uint32_t id)
 Return dataspace descriptor.
L4_CV void dsmlib_set_owner (dsmlib_ds_desc_t *ds, l4_threadid_t owner)
 Set dataspace owner.
L4_CV l4_threadid_t dsmlib_get_owner (const dsmlib_ds_desc_t *ds)
 Return owner of the dataspace.
L4_CV int dsmlib_is_owner (const dsmlib_ds_desc_t *ds, l4_threadid_t client)
 Check owner of dataspace.
L4_CV void dsmlib_set_name (dsmlib_ds_desc_t *ds, const char *name)
 Set dataspace name.
L4_CV char * dsmlib_get_name (dsmlib_ds_desc_t *ds)
 Get dataspace name.
L4_CV void dsmlib_set_dsm_ptr (dsmlib_ds_desc_t *ds, void *ptr)
 Set dataspace manager data.
L4_CV void * dsmlib_get_dsm_ptr (const dsmlib_ds_desc_t *ds)
 Get dataspace manager data.

Define Documentation

#define dsmlib_get_id ( ds   )     ((ds)->id)

Return dataspace id

Definition at line 73 of file dsmlib.h.


Typedef Documentation

Generic dataspace descriptor


Function Documentation

L4_CV dsmlib_ds_desc_t* dsmlib_create_dataspace ( void   ) 

Create new dataspace.

Returns:
Pointer to new dataspace descriptor, NULL if creation failed.
This function finds an unused dataspace id and creates a new dataspace descriptor. The new descriptor is added to the dataspace hash table and the dataspace list.

L4_CV void dsmlib_release_dataspace ( dsmlib_ds_desc_t ds  ) 

Release dataspace.

Parameters:
ds Dataspace descriptor
Removes the dataspace from the hash table / dataspace list and releases the dataspace descriptor.

L4_CV dsmlib_ds_desc_t* dsmlib_get_dataspace ( l4_uint32_t  id  ) 

Return dataspace descriptor.

Parameters:
id Dataspace id
Returns:
Pointer to dataspace descriptor, NULL if dataspace does not exist

L4_CV void dsmlib_set_owner ( dsmlib_ds_desc_t ds,
l4_threadid_t  owner 
)

Set dataspace owner.

Parameters:
ds Dataspace descriptor
owner Dataspace owner

L4_CV l4_threadid_t dsmlib_get_owner ( const dsmlib_ds_desc_t ds  ) 

Return owner of the dataspace.

Parameters:
ds Dataspace descriptor
Returns:
owner thread id, L4_INVALID_ID if invalid dataspace id

L4_CV int dsmlib_is_owner ( const dsmlib_ds_desc_t ds,
l4_threadid_t  client 
)

Check owner of dataspace.

Parameters:
ds Dataspace descriptor
client Client thread id
Returns:
1 if the client owns the dataspace, 0 otherwise.

L4_CV void dsmlib_set_name ( dsmlib_ds_desc_t ds,
const char *  name 
)

Set dataspace name.

Parameters:
ds Dataspace descriptor
name Dataspace name

L4_CV char* dsmlib_get_name ( dsmlib_ds_desc_t ds  ) 

Get dataspace name.

Parameters:
ds Dataspace descriptor
Returns:
Pointer to dataspace name, NULL if invalid dataspace descriptor

L4_CV void dsmlib_set_dsm_ptr ( dsmlib_ds_desc_t ds,
void *  ptr 
)

Set dataspace manager data.

Parameters:
ds Dataspace descriptor
ptr Dataspace manager data

L4_CV void* dsmlib_get_dsm_ptr ( const dsmlib_ds_desc_t ds  ) 

Get dataspace manager data.

Parameters:
ds Dataspace descriptor
Returns:
Pointer to dataspace manager data


DMphys Reference Manual, written by Lars Reuther  © 2000-2003