dm-if.c File Reference
Helper functions for communication with dataspace managers.
More...
#include "dm-if.h"
#include <stdio.h>
#include <string.h>
#include <l4/sys/consts.h>
#include <l4/env/errno.h>
#include <l4/env/env.h>
#include <l4/l4rm/l4rm.h>
#include <l4/dm_mem/dm_mem.h>
|
Functions |
int | create_ds (l4_threadid_t dm_id, l4_size_t size, l4_addr_t *addr, l4dm_dataspace_t *ds, const char *dbg_name) |
| Create a dataspace.
|
int | junk_ds (l4dm_dataspace_t *ds, l4_addr_t addr) |
| Junk an attached dataspace.
|
int | phys_ds (l4dm_dataspace_t *ds, l4_size_t size, l4_addr_t *phys_addr) |
| Determine physical address of dataspace.
|
int | dm_if_init (void) |
| Init dm helper stuff.
|
Variables |
l4_threadid_t | app_dsm_id = L4_INVALID_ID |
| default dataspace manager
|
l4_threadid_t | app_image_dsm = L4_INVALID_ID |
| dsm for file image
|
l4_threadid_t | app_text_dsm = L4_INVALID_ID |
| dsm for text section
|
l4_threadid_t | app_data_dsm = L4_INVALID_ID |
| dsm for data section
|
l4_threadid_t | app_bss_dsm = L4_INVALID_ID |
| dsm for bss section
|
l4_threadid_t | app_stack_dsm = L4_INVALID_ID |
| dsm for stack
|
Detailed Description
Helper functions for communication with dataspace managers.
- Date:
- 06/11/2001
- Author:
- Frank Mehnert
Function Documentation
int create_ds |
( |
l4_threadid_t |
dm_id, |
|
|
l4_size_t |
size, |
|
|
l4_addr_t * |
addr, |
|
|
l4dm_dataspace_t * |
ds, |
|
|
const char * |
dbg_name | |
|
) |
| | |
Create a dataspace.
- Parameters:
-
| dm_id | thread_id of dataspace manager to use |
| size | size of dataspace |
- Return values:
-
| addr | address of attached dataspace |
| ds | dataspace descriptor |
- Parameters:
-
| dbg_name | name of the dataspace for debugging purposes |
- Returns:
- 0 on success -L4_ENOMEM if not enough memory available
int junk_ds |
( |
l4dm_dataspace_t * |
ds, |
|
|
l4_addr_t |
addr | |
|
) |
| | |
Junk an attached dataspace.
- Parameters:
-
| ds | dataspace id (ignored if L4DM_INVALID_DATASPACE) |
| addr | dataspace map address (ignored if -1) |
int phys_ds |
( |
l4dm_dataspace_t * |
ds, |
|
|
l4_size_t |
size, |
|
|
l4_addr_t * |
phys_addr | |
|
) |
| | |
Determine physical address of dataspace.
- Parameters:
-
| ds | dataspace |
| size | size of the dataspace (to save one server call) |
- Return values:
-
| phys_addr | physical addr of dataspace |