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

Referenced by sem_post().


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

Generated on Mon Dec 10 00:56:38 2007 for brickOS C by doxygen 1.5.4