/tmp/l4check/full_tree/trunk/l4/pkg/l4io/server/src/main.c File Reference

L4Env l4io I/O Server Base Module. More...

#include <l4/sys/types.h>
#include <l4/env/errno.h>
#include <l4/sys/ipc.h>
#include <l4/sigma0/kip.h>
#include <l4/util/getopt.h>
#include <l4/rmgr/librmgr.h>
#include <l4/names/libnames.h>
#include <l4/log/l4log.h>
#include <l4/thread/thread.h>
#include <l4/generic_io/types.h>
#include <l4/generic_io/generic_io-server.h>
#include <stdio.h>
#include <stdlib.h>
#include "io.h"
#include "__config.h"
#include "__macros.h"
#include "res.h"
#include "pci.h"
#include "jiffies.h"
#include "events.h"
#include "omega0lib.h"

Go to the source code of this file.

Functions

static int io_info_init (void)
 Info initialization.
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.
Heart of I/O
Entry point (main) and infinite IPC server loop.

static void io_loop (void)
 I/O server IPC request loop.
static void do_args (int argc, char *argv[])
 do_args.
int main (int argc, char *argv[])
 Main of I/O server.

Variables

l4io_info_t io_info
 I/O info page.
char LOG_tag [9] = IO_NAMES_STR
 logging tag
l4_ssize_t l4libc_heapsize = 1 << 20
 heap
const int l4thread_max_threads = IO_MAX_THREADS
 configure thread library -- max number of threads
const l4_size_t l4thread_stack_size = 16 << 10
 Configure thread library -- size of stack.
static int cfg_events
static int cfg_dev_list = 1
static char * cfg_platform
static io_client_t io_self
 I/O server claimed resources and root for client list.


Detailed Description

L4Env l4io I/O Server Base Module.

Date:
05/28/2003
Author:
Christian Helmuth <ch12@os.inf.tu-dresden.de>

Definition in file main.c.


Function Documentation

static void do_args ( int  argc,
char *  argv[] 
) [static]

do_args.

command line parameter handling

Definition at line 263 of file main.c.

static int io_info_init ( void   )  [static]

Info initialization.

Returns:
0 (at this state no errors may happen)
Setup I/O info page values:
  • magic number
  • jiffies

Definition at line 226 of file main.c.

static void io_loop ( void   )  [static]

I/O server IPC request loop.

We act as DICE server serving IPC requests and _never_ return to main()

Test:
krishna: Hmm, is it clever to reference io_self in request?
Test:
krishna: Do we need receive timeouts?
Todo:
design some lookup macros/functions for traversing our lists

Definition at line 250 of file main.c.

int main ( int  argc,
char *  argv[] 
)

Main of I/O server.

main() function

Definition at line 329 of file main.c.


Variable Documentation

const l4_size_t l4thread_stack_size = 16 << 10

Configure thread library -- size of stack.

Default is 64KB. Decrease this number because we have some threads.

Definition at line 64 of file main.c.


l4io, written by Christian Helmuth  © 2003 Technische Universitaet Dresden