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. More...
 

Functions

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

Detailed Description

Interface: critical section management.

Author
Henner Zeller H.Zel.nosp@m.ler@.nosp@m.acm.o.nosp@m.rg

Defines types and functions to implement atomic counters.

Definition in file atomic.h.

Typedef Documentation

§ atomic_t

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

§ atomic_dec()

void atomic_dec ( atomic_t counter)

decrement atomic counter without interruption.

locks interrupts except NMI, decrements count then restores interrupts.

Parameters
counterthe counter resource to be decremented
See also
atomic_inc

§ atomic_inc()

void atomic_inc ( atomic_t counter)

increment atomic counter without interruption.

locks interrupts except NMI, increments count then restores interrupts.

Parameters
counterthe 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 for brickOS C by doxygen 1.8.12