Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

atomic.h File Reference

Interface: critical section management. More...

#include <config.h>

Include dependency graph for atomic.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef volatile unsigned char atomic_t
 The data type that allows for atomic count operations.

Functions

void atomic_dec (atomic_t *counter)
 decrement atomic counter without interruption.
void atomic_inc (atomic_t *counter)
 increment atomic counter without interruption.


Detailed Description

Interface: critical section management.

Author:
Henner Zeller <H.Zeller@acm.org>
Defines types and functions to implement atomic counters.

Definition in file atomic.h.


Typedef Documentation

typedef volatile unsigned char atomic_t
 

The data type that allows for atomic count operations.

See also:
atomic_inc

Definition at line 43 of file atomic.h.


Function Documentation

void atomic_dec atomic_t counter  ) 
 

decrement atomic counter without interruption.

locks interrupts except NMI, decrements count then restores interrupts.

Parameters:
counter the counter resource to be decremented
See also:
atomic_inc

void atomic_inc atomic_t counter  ) 
 

increment atomic counter without interruption.

locks interrupts except NMI, increments count then restores interrupts.

Parameters:
counter the counter resource to be incremented
See also:
atomic_dec


brickOS is released under the Mozilla Public License.
Original code copyright 1998-2005 by the authors.

Generated on Fri Jan 21 21:46:18 2005 for brickOS Kernel Developer by doxygen 1.4.1