Main Page | Modules | Class List | File List | Class Members | File Members | Related Pages

global.c File Reference

Globally Required Stuff. More...

#include <l4/lock/lock.h>
#include <l4/dde_linux/dde.h>
#include <asm/system.h>
#include <stdlib.h>
#include "__config.h"
#include "internal.h"
#include <linux/spinlock.h>
#include <asm/delay.h>

Go to the source code of this file.

Synchronization

Linux kernel synchronization is sometimes based on cli()/sti() pairs.

As discussed in "Taming Linux" simply disabling Interrupts via cli and sti assembly statements is unacceptable in DROPS. The DDE uses the same lock based scheme as a tamed L4Linux server.

void __global_cli ()
 Global CLear Interrupt flag.

void __global_sti ()
 Global SeT Interrupt flag.

unsigned long __global_save_flags ()
 Global save flags.

void __global_restore_flags (unsigned long flags)
 Global restore flags.

l4lock_t irq_lock = L4LOCK_UNLOCKED_INITIALIZER
 Interrupt lock.


Miscellaneous

int get_option (char **str, int *pint)
 Parse integer from an option string.

char * get_options (char *str, int nints, int *ints)
 Parse a string into a list of integers.

void udelay (unsigned long usecs)
 Delay some usecs.

int l4dde_driver_classes_init (void)
 Dummy for DDE2.6.

spinlock_cacheline_t kernel_flag_cacheline = {SPIN_LOCK_UNLOCKED}
 BIG kernel lock.


Detailed Description

Globally Required Stuff.

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

Definition in file global.c.


Function Documentation

void __global_cli  ) 
 

Global CLear Interrupt flag.

Acquire irq_lock. Do not grab it twice!

Definition at line 46 of file global.c.

References irq_lock.

Referenced by __global_restore_flags().

void __global_restore_flags unsigned long  flags  ) 
 

Global restore flags.

Parameters:
flags indicates action
It restores irq_lock state.
See also:
__global_save_flags

Definition at line 87 of file global.c.

References __global_cli(), __global_sti(), and DEBUG_MSG.

unsigned long __global_save_flags  ) 
 

Global save flags.

Returns:
flags indicating action on __global_restore_flags(flag)
0 - global cli 1 - global sti 2 - local cli 3 - local sti

It is used to save the current irq_lock state.

See also:
__global_restore_flags

Definition at line 73 of file global.c.

References irq_lock.

void __global_sti  ) 
 

Global SeT Interrupt flag.

Release irq_lock.

Definition at line 56 of file global.c.

References irq_lock.

Referenced by __global_restore_flags().

int get_option char **  str,
int *  pint
 

Parse integer from an option string.

(from lib/cmdline.c)

Definition at line 110 of file global.c.

Referenced by get_options().

char* get_options char *  str,
int  nints,
int *  ints
 

Parse a string into a list of integers.

(from lib/cmdline.c)

Definition at line 131 of file global.c.

References get_option().

void udelay unsigned long  usecs  ) 
 

Delay some usecs.

Todo:
consider l4_busy_wait_us() for short delays

Definition at line 159 of file global.c.


Linux DDE, written by Christian Helmuth  © 2003 Technische Universitaet Dresden