Introduction   User API Reference   DSMlib Reference   IDL Interface   File List   Index  

Memory Dataspace Manager Interface
[Dataspace Manager Interface IDL Specifications]


Files

file  dm_mem.idl
 L4 memory dataspace manager interface.

Data Structures

interface  if_l4dm::mem

Functions

long if_l4dm::mem::open ([in] unsigned long size,[in] unsigned long align,[in] unsigned long flags,[in, string] char *name,[out] l4dm_dataspace_t *ds)
 Create a new dataspace.
long if_l4dm::mem::size ([in] unsigned long ds_id,[out] l4_size_t *size)
 Request the size of a dataspace.
long if_l4dm::mem::resize ([in] unsigned long ds_id,[in] unsigned long new_size)
 Resize dataspace.
long if_l4dm::mem::phys_addr ([in] unsigned long ds_id,[in] unsigned long offset,[in] l4_size_t size,[out] unsigned long *paddr,[out] l4_size_t *psize)
 Request phys. address of a dataspace region.
long if_l4dm::mem::is_contiguous ([in] unsigned long ds_id,[out] long *is_cont)
 Check if dataspace is allocated on contiguous phys. memory.
long if_l4dm::mem::lock ([in] unsigned long ds_id,[in] unsigned long offset,[in] unsigned long size)
 Lock ("pin") a region of a dataspace.
long if_l4dm::mem::unlock ([in] unsigned long ds_id,[in] unsigned long offset,[in] unsigned long size)
 Unlock a region of a dataspace.
long if_l4dm::mem::info ([in] unsigned long ds_id,[out] l4_size_t *size,[out] l4_threadid_t *owner,[out, string, prealloc_client] char **name,[out] l4_uint32_t *next_id)
 Return information about a dataspace for debugging purposes.

Function Documentation

long if_l4dm::mem::open ( [in] unsigned long  size,
[in] unsigned long  align,
[in] unsigned long  flags,
[in, string] char *  name,
[out] l4dm_dataspace_t ds 
) [inherited]

Create a new dataspace.

Parameters:
size Dataspace size
align Alignment
flags Flags
name Dataspace name
Return values:
ds Dataspace id
Returns:
0 on success (ds contains the id of the newly created dataspace), error code otherwise:
  • -L4_ENOMEM out of memory
Create a new memory dataspace.

long if_l4dm::mem::size ( [in] unsigned long  ds_id,
[out] l4_size_t *  size 
) [inherited]

Request the size of a dataspace.

Parameters:
ds_id Dataspace id
Return values:
size Dataspace size
Returns:
0 on success (size contains the size of the dataspace), error code otherwise:
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM operation not permitted

long if_l4dm::mem::resize ( [in] unsigned long  ds_id,
[in] unsigned long  new_size 
) [inherited]

Resize dataspace.

Parameters:
ds_id Dataspace id
new_size New dataspace size
Returns:
0 on success (resized dataspace), error code otherwise:
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM operation not permitted, only the owner can change the size of a dataspace
  • -L4_ENOMEM out of memory

long if_l4dm::mem::phys_addr ( [in] unsigned long  ds_id,
[in] unsigned long  offset,
[in] l4_size_t  size,
[out] unsigned long *  paddr,
[out] l4_size_t *  psize 
) [inherited]

Request phys. address of a dataspace region.

Parameters:
ds_id Dataspace id
offset Offset in dataspace
size Region size
Return values:
paddr Phys. address of offset
psize Size of phys. contiguous region, if this is smaller than the requested region size, the phys. address of the remaining region must be requested with subsequent calls of phys_addr
Returns:
0 on success , error code otherwise:
  • -L4_EINVAL invalid dataspace id or dataspace not pinned
  • -L4_EPERM operation not permitted

long if_l4dm::mem::is_contiguous ( [in] unsigned long  ds_id,
[out] long *  is_cont 
) [inherited]

Check if dataspace is allocated on contiguous phys. memory.

Parameters:
ds_id Dataspace id
Return values:
is_cont 1 if memory is phys. contiguous, 0 if not
Returns:
0 on success , error code otherwise:
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM operation not permitted

long if_l4dm::mem::lock ( [in] unsigned long  ds_id,
[in] unsigned long  offset,
[in] unsigned long  size 
) [inherited]

Lock ("pin") a region of a dataspace.

Parameters:
ds_id Dataspace id
offset Offset in dataspace
size region size
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM operation not permitted, the caller must either be the owner or must have the lock-right on the dataspace

long if_l4dm::mem::unlock ( [in] unsigned long  ds_id,
[in] unsigned long  offset,
[in] unsigned long  size 
) [inherited]

Unlock a region of a dataspace.

Parameters:
ds_id Dataspace id
offset Offset in dataspace
size region size
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM operation not permitted

long if_l4dm::mem::info ( [in] unsigned long  ds_id,
[out] l4_size_t *  size,
[out] l4_threadid_t *  owner,
[out, string, prealloc_client] char **  name,
[out] l4_uint32_t *  next_id 
) [inherited]

Return information about a dataspace for debugging purposes.

Parameters:
ds_id Dataspace id
Return values:
size size of dataspace
owner dataspace owner
name name of dataspace
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM operation not permitted


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