/tmp/l4check/full_tree/trunk/l4/pkg/dde_linux/lib/src/global.c File Reference

Globally Required Stuff. More...

#include <l4/lock/lock.h>
#include <l4/dde_linux/dde.h>
#include <asm/system.h>
#include "internal.h"
#include <stdlib.h>
#include <linux/spinlock.h>
#include <asm/delay.h>
#include <linux/reboot.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.

static l4lock_t irq_lock = L4LOCK_UNLOCKED_INITIALIZER
 Interrupt lock.
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.

Miscellaneous

spinlock_cacheline_t kernel_flag_cacheline = {SPIN_LOCK_UNLOCKED}
 BIG kernel lock.
int get_option (char **str, int *pint)
 Parse integer from an option string

(from lib/cmdline.c).

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

(from lib/cmdline.c).

void udelay (unsigned long usecs)
 Delay some usecs.
int l4dde_driver_classes_init (void)
 Dummy for DDE2.6.
int register_reboot_notifier (struct notifier_block *arg0)
 Dummy .
int unregister_reboot_notifier (struct notifier_block *arg0)
 Dummy .


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 43 of file global.c.

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 84 of file global.c.

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 <unused> 3 - local sti <unused>

It is used to save the current irq_lock state.

See also:
__global_restore_flags

Definition at line 70 of file global.c.

void __global_sti (  ) 

Global SeT Interrupt flag.

Release irq_lock.

Definition at line 53 of file global.c.

int register_reboot_notifier ( struct notifier_block *  arg0  ) 

Dummy .

..

Definition at line 172 of file global.c.

void udelay ( unsigned long  usecs  ) 

Delay some usecs.

Todo:
consider l4_busy_wait_us() for short delays

Definition at line 156 of file global.c.

int unregister_reboot_notifier ( struct notifier_block *  arg0  ) 

Dummy .

..

Definition at line 181 of file global.c.


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