Main of l4io (including IPC server loop) and Miscellaneous Services

Herein resides everything concerning general io server purposes and miscellaneous functions not worth an own module. More...

Classes

struct  io_client
 l4io client structure type. More...

Miscellaneous Services (IPC interface)

Client registry and special services.

long l4_io_register_client_component (CORBA_Object _dice_corba_obj, l4_io_drv_t type, CORBA_Server_Environment *_dice_corba_env)
 Client Registration.
long l4_io_unregister_client_component (CORBA_Object _dice_corba_obj, const l4_threadid_t *client, CORBA_Server_Environment *_dice_corba_env)
 Client Unregistering.
long l4_io_map_info_component (CORBA_Object _dice_corba_obj, l4_snd_fpage_t *info, CORBA_Server_Environment *_dice_corba_env)
 Request mapping of I/O's info page.

Typedefs

typedef struct io_client io_client_t
 l4io client structure type.

Functions

static void jiffies_thread (void *data)
 Jiffies thread loop.
int io_jiffies_init ()
 Jiffies thread initialization.
__inline__ int client_equal (io_client_t *c0, io_client_t *c1)
 Test client equality.

Variables

static unsigned long long
volatile * 
kclock
 kernel clock reference
l4io_info_t io_info
 I/O info page.
static io_client_t io_self
 I/O server claimed resources and root for client list.

Detailed Description

Herein resides everything concerning general io server purposes and miscellaneous functions not worth an own module.


Function Documentation

__inline__ int client_equal ( io_client_t c0,
io_client_t c1 
)

Test client equality.

Parameters:
c0 first io client to test
c1 second io client to test
Returns:
0 on equality, non-zero on inequality

Definition at line 52 of file io.h.

int io_jiffies_init ( void   ) 

Jiffies thread initialization.

Returns:
0 on success, negative error code otherwise
Initialize jiffie counter thread.

Definition at line 110 of file jiffies.c.

static void jiffies_thread ( void *  data  )  [static]

Jiffies thread loop.

Parameters:
data dummy data pointer (unused)
This thread implements the LINUX jiffies counter. It sleeps and tries to correct the period using the L4 kernel clock.

XXX test for (wait < 0) to increment jiffies by 2 or more if JIFFIE_PERIOD is too short

Definition at line 73 of file jiffies.c.

long l4_io_map_info_component ( CORBA_Object  _dice_corba_obj,
l4_snd_fpage_t *  info,
CORBA_Server_Environment *  _dice_corba_env 
)

Request mapping of I/O's info page.

Parameters:
_dice_corba_obj DICE corba object
Return values:
info L4 fpage for I/O info
_dice_corba_env corba environment
Returns:
0 on success, negative error code otherwise
One fpage will be sent to the clients using the standard L4 fpage types/mechanisms.

Todo:
check registration on info page mapping

Definition at line 195 of file main.c.

long l4_io_register_client_component ( CORBA_Object  _dice_corba_obj,
l4_io_drv_t  type,
CORBA_Server_Environment *  _dice_corba_env 
)

Client Registration.

Parameters:
_dice_corba_obj DICE corba object
type client info
Return values:
_dice_corba_env corba environment
Returns:
0 on success, negative error code otherwise
Register client (driver server). I/O keeps a list of registered clients and only these will be served.

Definition at line 98 of file main.c.

long l4_io_unregister_client_component ( CORBA_Object  _dice_corba_obj,
const l4_threadid_t *  client,
CORBA_Server_Environment *  _dice_corba_env 
)

Client Unregistering.

Parameters:
_dice_corba_obj DICE corba object
Return values:
_dice_corba_env corba environment
Returns:
0 on success, negative error code otherwise
Unregister client (driver server). I/O keeps a list of registered clients and only these will be served.

Test:
krishna: At this point we have to keep track of up-to-date resource allocation info -> all allocated resources should be freed on unregistering. (just I don't mind about this at this state, later driver replacing will be in scope of this)

Definition at line 147 of file main.c.


l4io, written by Christian Helmuth  © 2003 Technische Universitaet Dresden