Generic atomic class for referencing atomic objects and static functions.
More...
#include <atomic.h>
|
static void * | alloc (size_t size) |
| Atomically aligned heap alloc function. More...
|
|
|
static const bool | simulated |
| Set to true if atomics have to be simulated with mutexes.
|
|
Generic atomic class for referencing atomic objects and static functions.
We have an atomic counter and spinlock, and in the future we may add other atomic classes and atomic manipulations needed to create lockfree data structures. The atomic classes use mutexes if no suitable atomic code is available.
- Author
- David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org
Definition at line 49 of file atomic.h.
static void* ucommon::atomic::alloc |
( |
size_t |
size | ) |
|
|
static |
Atomically aligned heap alloc function.
- Parameters
-
size | of memory to allocate. |
- Returns
- pointer or NULL if cannot alloc.
The documentation for this class was generated from the following file: