dataspace.c File Reference

Control / Data dataspace handling. More...

Go to the source code of this file.

Functions

static int __get_dm_id (void)
 Request dataspace manager from L4 environment.
static l4_size_t __get_ctrl_ds_size (dsi_stream_cfg_t cfg)
 Calculate control dataspace size.
static void __init_ctrl_ds (l4_addr_t map_addr, l4_size_t size, dsi_stream_cfg_t cfg)
 Initialize control dataspace.
static int __map_ctrl_ds (dsi_socket_t *socket, dsi_stream_cfg_t cfg)
 Map control dataspace, setup pointers in socket structure.
int dsi_create_ctrl_area (dsi_socket_t *socket, dsi_jcp_stream_t jcp_stream, dsi_stream_cfg_t cfg)
 Allocate and setup control area.
int dsi_set_ctrl_area (dsi_socket_t *socket, l4dm_dataspace_t ctrl_ds, dsi_jcp_stream_t jcp_stream, dsi_stream_cfg_t cfg)
 Attach and setup control area.
int dsi_release_ctrl_area (dsi_socket_t *socket)
 Release control dataspace.
int dsi_set_data_area (dsi_socket_t *socket, l4dm_dataspace_t data_ds)
 Attach data dataspace.
int dsi_release_data_area (dsi_socket_t *socket)
 Detach data dataspace.
void dsi_init_dataspaces (void)
 Setup dataspace handling.
int dsi_socket_share_ds (dsi_socket_t *socket, l4_threadid_t client)
 Share socket dataspaces.
void dsi_ds_set_dataspace_manager (l4_threadid_t id)
 Set new dataspace manager.
int dsi_ds_setup_ctrl_dataspace (l4dm_dataspace_t *ds, dsi_stream_cfg_t cfg)
 Setup control dataspace.
int dsi_ds_create_ctrl_dataspace (dsi_stream_cfg_t cfg, l4dm_dataspace_t *ds)
 Create control dataspace.

Variables

static l4_threadid_t dsi_dm_id = L4_INVALID_ID
 dataspace manager id
static l4_uint32_t cds_map_area = -1
 map area control dataspaces
static l4_uint32_t dds_map_area = -1
 map area data dataspaces


Detailed Description

Control / Data dataspace handling.

Date:
07/01/2000
Author:
Lars Reuther <reuther@os.inf.tu-dresden.de>
Todo:
Do not manage attach area for control / data datspaces (next_map_cds, next_map_dds), use l4rm instead (requires that l4rm provides alligned attachs to be able to map larger areas by just one flexpage).
Todo:
Rethink whole dataspace handling. Who creates/attaches/frees/detaches dataspaces.

Definition in file dataspace.c.


Function Documentation

static l4_size_t __get_ctrl_ds_size ( dsi_stream_cfg_t  cfg  )  [inline, static]

Calculate control dataspace size.

Parameters:
cfg Stream configuration
Returns:
Control dataspace size

Definition at line 95 of file dataspace.c.

References dsi_stream_cfg::max_sg, and dsi_stream_cfg::num_packets.

Referenced by dsi_create_ctrl_area(), dsi_ds_create_ctrl_dataspace(), and dsi_ds_setup_ctrl_dataspace().

static void __init_ctrl_ds ( l4_addr_t  map_addr,
l4_size_t  size,
dsi_stream_cfg_t  cfg 
) [static]

Initialize control dataspace.

Parameters:
map_addr Dataspace map address
size Dataspace size
cfg Stream configuration
Initialize data structures of control dataspace

Definition at line 114 of file dataspace.c.

References dsi_stream_cfg::max_sg, dsi_ctrl_header::max_sg_len, dsi_ctrl_header::num_packets, dsi_stream_cfg::num_packets, dsi_ctrl_header::num_sg_elems, dsi_ctrl_header::packets_committed, dsi_packet::rx_sem, and dsi_packet::tx_sem.

Referenced by dsi_create_ctrl_area(), dsi_ds_create_ctrl_dataspace(), and dsi_ds_setup_ctrl_dataspace().

int dsi_release_data_area ( dsi_socket_t socket  ) 

Detach data dataspace.

Parameters:
socket Socket descriptor
Returns:
0 on success, error code otherwise.

Definition at line 577 of file dataspace.c.

References dsi_socket::data_area, dsi_socket::data_ds, and dsi_socket::flags.

Referenced by dsi_socket_close().


Generated on Wed Apr 11 06:40:13 2012 for DSI - Drops Streaming Interface by  doxygen 1.5.6