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

include/atomic.h File Reference

Interface: critical section management. More...

#include <config.h>

Include dependency graph for atomic.h:

Include dependency graph

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

Included by dependency graph

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

Referenced by sem_post().


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

Generated on Mon Feb 16 21:01:59 2004 for brickOS C++ by doxygen 1.3.5