Open/Close/Copy Dataspaces
[Dataspace Manager Client API]

Functions to open / close dataspaces and to create copies of dataspaces. More...

Defines

#define L4DM_RESIZE   0x00000080
#define L4DM_CONTIGUOUS   0x00000100
#define L4DM_PINNED   0x00000200
#define L4DM_COW   0x00000400
#define L4DM_SAME_TASK   0x00002000
#define L4DM_WHOLE_DS   (-1)
#define L4DM_DEFAULT_DSM   L4_INVALID_ID

Functions

L4_CV int l4dm_close (const l4dm_dataspace_t *ds)
 Close dataspace.
int l4dm_close_all (l4_threadid_t dsm_id, l4_threadid_t client, l4_uint32_t flags)
 Close all dataspaces of a client.
L4_CV int l4dm_copy (const l4dm_dataspace_t *ds, l4_uint32_t flags, const char *name, l4dm_dataspace_t *copy)
 Create dataspace copy, short form.
int l4dm_copy_long (const l4dm_dataspace_t *ds, l4_offs_t src_offs, l4_offs_t dst_offs, l4_size_t num, l4_uint32_t flags, const char *name, l4dm_dataspace_t *copy)
 Create dataspace copy, long form.

Detailed Description

Functions to open / close dataspaces and to create copies of dataspaces.


Define Documentation

#define L4DM_RESIZE   0x00000080

Allow resize

Definition at line 45 of file consts.h.

#define L4DM_CONTIGUOUS   0x00000100

Allocate phys. contiguous memory

Definition at line 60 of file consts.h.

#define L4DM_PINNED   0x00000200

Allocated pinned memory

Definition at line 64 of file consts.h.

#define L4DM_COW   0x00000400

Create copy-on-write dataspace copy

Definition at line 67 of file consts.h.

#define L4DM_SAME_TASK   0x00002000

Close dataspace owned by threads of the same task

Definition at line 82 of file consts.h.

#define L4DM_WHOLE_DS   (-1)

Copy: create copy of the whole dataspace, phys_addr: return the phys. addresses of the whole dataspace

Definition at line 95 of file consts.h.

#define L4DM_DEFAULT_DSM   L4_INVALID_ID

Open: use default dataspcae manager

Definition at line 104 of file consts.h.


Function Documentation

L4_CV int l4dm_close ( const l4dm_dataspace_t ds  ) 

Close dataspace.

Parameters:
ds Dataspace id
Returns:
0 on success, error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM operation not permitted, only the owner can close a dataspace

int l4dm_close_all ( l4_threadid_t  dsm_id,
l4_threadid_t  client,
l4_uint32_t  flags 
)

Close all dataspaces of a client.

Parameters:
dsm_id Dataspace manager thread id
client Client thread id
flags Flags:
  • L4DM_SAME_TASK close all dataspaces owned by threads of the task specified by client.
Returns:
0 on success, error code otherwise:
  • -L4_EINVAL invalid client thread id
  • -L4_EPERM permission denied
  • -L4_EIPC IPC error calling dataspace manager
This function can be called by everyone. It's up to the dataspace manager to decide who is allowed to close that dataspaces.

L4_CV int l4dm_copy ( const l4dm_dataspace_t ds,
l4_uint32_t  flags,
const char *  name,
l4dm_dataspace_t copy 
)

Create dataspace copy, short form.

Parameters:
ds Source dataspace id
flags Flags:
name Copy name
Return values:
copy Copy dataspace id
Returns:
0 on success (copy contains the id of the created copy), error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL Invalid source dataspace id
  • -L4_EPERM Permission denied
  • -L4_ENOHANDLE Could not create dataspace descriptor
  • -L4_ENOMEM Out of memory creating copy
Create a copy of the whole dataspace.

int l4dm_copy_long ( const l4dm_dataspace_t ds,
l4_offs_t  src_offs,
l4_offs_t  dst_offs,
l4_size_t  num,
l4_uint32_t  flags,
const char *  name,
l4dm_dataspace_t copy 
)

Create dataspace copy, long form.

Parameters:
ds Source dataspace id
src_offs Offset in source dataspace
dst_offs Offset in destination dataspace
num Number of bytes to copy, set to L4DM_WHOLE_DS to copy the whole dataspace starting at src_offs
flags Flags
name Copy name
Return values:
copy Dataspace id of copy
Returns:
0 on success, error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL Invalid source dataspace id
  • -L4_EPERM Permission denied
  • -L4_ENOHANDLE Could not create dataspace descriptor
  • -L4_ENOMEM Out of memory creating copy
Create a copy of the dataspace, src_offs and num specify the area of the source dataspace which should be copied to the destination dataspace at offset dst_offs. There are no restrictions to the offsets, in particular they do not need to be aligned to pagesizes.


Generated on Wed Apr 11 06:38:25 2012 for L4Env Generic Dataspace Manager Interface by  doxygen 1.5.6