/tmp/l4check/full_tree/trunk/l4/pkg/generic_io/lib/clientlib/init.c File Reference

L4Env I/O Client Library Initialization. More...

#include <stdio.h>
#include <l4/sys/types.h>
#include <l4/env/errno.h>
#include <l4/sys/syscalls.h>
#include <l4/l4rm/l4rm.h>
#include <l4/names/libnames.h>
#include <l4/generic_io/libio.h>
#include "internal.h"
#include "__macros.h"

Go to the source code of this file.

Defines

#define CONFIG_LOG_INFOPAGE_MAPPING   0

Functions

static int __io_register (l4_uint32_t *type)
 Registration wrapper.
static int __io_mapping (l4io_info_t **addr)
int l4io_init (l4io_info_t **io_info_addr, l4io_drv_t type)
l4io_info_t * l4io_info_page (void)

Variables

char * IO_NAMES_STR = "io"
l4_threadid_t io_l4id = L4_INVALID_ID
static int _initialized = 0
static l4io_info_t * io_info_page_pointer
l4io_info_t io_info


Detailed Description

L4Env I/O Client Library Initialization.

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

Definition in file init.c.


Function Documentation

static int __io_mapping ( l4io_info_t **  addr  )  [static]

Info page mapping wrapper

Parameters:
addr mapping address
Return values:
addr actual mapping address
Returns:
0 on success, negative error code otherwise
Todo:
clean up l4_fpage_unmap(io_page) workaround

Definition at line 74 of file init.c.

static int __io_register ( l4_uint32_t *  type  )  [static]

Registration wrapper.

Parameters:
type driver information
Returns:
0 on success, negative error code otherwise

Definition at line 54 of file init.c.

int l4io_init ( l4io_info_t **  io_info_addr,
l4io_drv_t  type 
)

Library initialization

Parameters:
io_info_addr desired address for mapping of io info page:
  • 0: libio uses dedicated section and provides jiffies and HZ symbols
  • -1: no mapping is done at all
  • otherwise io_info_addr is used; area has to be prereserved at RM
type driver class (look into libio.h)
Return values:
io_info_addr actual mapping address (or -1 if no mapping)
Returns:
0 on success, negative error code otherwise
This initializes libio. Before io info page is mapped into client's address space any potentially mapping at the given address is FLUSHED! io_info_addr has to be pagesize aligned.

Todo:
driver classes (OS, device, ...)

Definition at line 164 of file init.c.


Variable Documentation

int _initialized = 0 [static]

initialization flag

Definition at line 40 of file init.c.

l4_threadid_t io_l4id = L4_INVALID_ID

io's thread id

Definition at line 38 of file init.c.

char* IO_NAMES_STR = "io"

unique name of io server

Definition at line 33 of file init.c.


generic_io, written by Christian Helmuth  © 2003 Technische Universitaet Dresden