Atomic Operations: Generic implementation. More...
#include <compiler.h>#include <interrupt.h>Go to the source code of this file.
Data Structures | |
| struct | atomic_object |
| Implementation-specific structure holding an atomic object. More... | |
Typedefs | |
| typedef struct atomic_object | atomic_t |
| An atomic object representing a value which is manipulated atomically. | |
Functions | |
| static atomic_value_t | atomic_read (atomic_t *ptr) |
| Return the value of the atomic object at ptr. | |
| static void | atomic_write (atomic_t *ptr, atomic_value_t value) |
| Write value to the atomic object at ptr. | |
| static atomic_t | atomic_add (atomic_t *ptr, atomic_value_t value) |
| Atomically add value to the value stored at ptr. | |
| static atomic_t | atomic_sub (atomic_t *ptr, atomic_value_t value) |
| Atomically subtract value from the value stored at ptr. | |
Atomic Operations: Generic implementation.
Architectures which don't have any special mechanisms for atomic operations may include this file after defining the type atomic_value_t to something suitable for the architecture.
The generic implementation disables interrupts to achieve atomicity.
Copyright (C) 2009 Atmel Corporation. All rights reserved.
Definition in file atomic.h.
1.6.3