Introduction   User API Reference   DSMlib Reference   IDL Interface   File List   Index  

Dataspace Client Handling
[Dataspace Manager Client API]

Functions to control dataspace client access rights. More...

Defines

#define L4DM_ALL_RIGHTS   0x000000FF

Functions

L4_CV int l4dm_share (const l4dm_dataspace_t *ds, l4_threadid_t client, l4_uint32_t rights)
 Grant dataspace access rights to a client.
int l4dm_revoke (const l4dm_dataspace_t *ds, l4_threadid_t client, l4_uint32_t rights)
 Revoke dataspace access rights.
L4_CV int l4dm_check_rights (const l4dm_dataspace_t *ds, l4_uint32_t rights)
 Check dataspace access rights.
L4_CV int l4dm_transfer (const l4dm_dataspace_t *ds, l4_threadid_t new_owner)
 Transfer dataspace ownership.

Detailed Description

Functions to control dataspace client access rights.

Currently, dataspace managers implement a thread-based access control list for each dataspace.

Each dataspace is owned by a thread. Initialy, the thread which createded the dataspace owns it. The ownership can be transfered using l4dm_transfer(). The owner has full control over the dataspace, in particular only the owner can close a dataspace.

Access rights for other threads can be granted using l4dm_share(). A thread can only grant access rights to a dataspace up to the rights it owns itself on the dataspace. Access rights can be revoked using l4dm_revoke().


Define Documentation

#define L4DM_ALL_RIGHTS   0x000000FF

all rights

Definition at line 54 of file dm_generic/include/consts.h.


Function Documentation

L4_CV int l4dm_share ( const l4dm_dataspace_t ds,
l4_threadid_t  client,
l4_uint32_t  rights 
)

Grant dataspace access rights to a client.

Parameters:
ds Dataspace descriptor
client Client thread id
rights Access rights:
Returns:
0 on success, error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM the requested rights for the new client exceed the rights of the caller for the dataspace
Grant / extend dataspace access rights to a client. If the client already has access to the dataspace, the new rights are added to the existing rights.

int l4dm_revoke ( const l4dm_dataspace_t ds,
l4_threadid_t  client,
l4_uint32_t  rights 
)

Revoke dataspace access rights.

Parameters:
ds Dataspace descriptor
client Client thread id
rights Access rights:
Returns:
0 on success, error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM caller has not the right to revoke access rights
Revoke dataspace access rights. If the resulting rights for the specified client are 0, the client is removed from the dataspaces client list.

L4_CV int l4dm_check_rights ( const l4dm_dataspace_t ds,
l4_uint32_t  rights 
)

Check dataspace access rights.

Parameters:
ds Dataspace descriptor
rights Access rights:
Returns:
0 if caller has the access rights, error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL invalid dataspace id
  • -L4_EPERM requested operations not allowed
Check if the caller has the specified access rights for the dataspace.

L4_CV int l4dm_transfer ( const l4dm_dataspace_t ds,
l4_threadid_t  new_owner 
)

Transfer dataspace ownership.

Parameters:
ds Dataspace descriptor
new_owner New dataspace owner
Returns:
0 on success (set owner to new_owner), error code otherwise:
  • -L4_EIPC IPC error calling dataspace manager
  • -L4_EINVAL Invalid dataspace descriptor
  • -L4_EPERM Permission denied, only the current owner can transfer the ownership


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