hexo/atomic.h header reference
[Hardware abstraction layer module]

The source code of this header can be browsed online.

Description  

When SMP is enabled, atomic operations are provided either by processor atomic instructions or by spin locked access to a regular integer value, depending on processor and platform support.

In the same way, spin lock implementation can either rely on processor atomic operations or use an architecture specific locking mechanism.

Atomic functions may include some memory barriers to ensure the consistency of memory accesses on weakly-ordered memory architectures.

Members  

Types  

Functions  

Members detail  

#define ATOMIC_H_  

This macro is declared in hexo/atomic.h source file, line 23.

#define __ATOMIC_PROTO(attr, type)  

This macro is declared in hexo/atomic.h source file, line 52.

atomic_int_t atomic_add(atomic_t *a, atomic_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

atomic_int_t atomic_and(atomic_t *a, atomic_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

void atomic_bit_clr(atomic_t *a, uint_fast8_t n)  

this function atomically clears bit in integer value in memory

void atomic_bit_set(atomic_t *a, uint_fast8_t n)  

this function atomically sets bit in integer value in memory

bool_t atomic_bit_test(atomic_t *a, uint_fast8_t n)  

this function tests bit in integer value in memory

The return value is 0 if bit is cleared.

bool_t atomic_bit_testclr(atomic_t *a, uint_fast8_t n)  

this function atomically tests and clears bit in integer value in memory

The return value is 0 if bit was cleared before.

bool_t atomic_bit_testset(atomic_t *a, uint_fast8_t n)  

this function atomically tests and sets bit in integer value in memory

The return value is 0 if bit was cleared before.

bool_t atomic_compare_and_swap(atomic_t *a, atomic_int_t old, atomic_int_t future)  

this function compares memory to old and replace with future if they are the same.

The return value is true if exchanged

bool_t atomic_dec(atomic_t *a)  

this function atomically decrements integer value in memory

The return value is 0 if the new value is 0.

atomic_fast16_int_t atomic_fast16_add(atomic_fast16_t *a, atomic_fast16_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

atomic_fast16_int_t atomic_fast16_and(atomic_fast16_t *a, atomic_fast16_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

void atomic_fast16_bit_clr(atomic_fast16_t *a, uint_fast8_t n)  

this function atomically clears bit in integer value in memory

void atomic_fast16_bit_set(atomic_fast16_t *a, uint_fast8_t n)  

this function atomically sets bit in integer value in memory

bool_t atomic_fast16_bit_test(atomic_fast16_t *a, uint_fast8_t n)  

this function tests bit in integer value in memory

The return value is 0 if bit is cleared.

bool_t atomic_fast16_bit_testclr(atomic_fast16_t *a, uint_fast8_t n)  

this function atomically tests and clears bit in integer value in memory

The return value is 0 if bit was cleared before.

bool_t atomic_fast16_bit_testset(atomic_fast16_t *a, uint_fast8_t n)  

this function atomically tests and sets bit in integer value in memory

The return value is 0 if bit was cleared before.

bool_t atomic_fast16_compare_and_swap(atomic_fast16_t *a, atomic_fast16_int_t old, atomic_fast16_int_t future)  

this function compares memory to old and replace with future if they are the same.

The return value is true if exchanged

bool_t atomic_fast16_dec(atomic_fast16_t *a)  

this function atomically decrements integer value in memory

The return value is 0 if the new value is 0.

atomic_fast16_int_t atomic_fast16_get(atomic_fast16_t *a)  

this function gets atomic integer value in memory

bool_t atomic_fast16_inc(atomic_fast16_t *a)  

this function atomically increments integer value in memory.

The return value is 0 if the new value is 0.

atomic_fast16_int_t atomic_fast16_or(atomic_fast16_t *a, atomic_fast16_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

void atomic_fast16_set(atomic_fast16_t *a, atomic_fast16_int_t value)  

this function sets atomic integer value in memory

atomic_fast16_int_t atomic_fast16_swap(atomic_fast16_t *a, atomic_fast16_int_t value)  

this function atomically swap a value in memory.

The return value is the previous value.

typedef struct arch_atomic_fast16_s atomic_fast16_t  

This typedef is declared in hexo/atomic.h source file, line 51.

atomic_fast16_int_t atomic_fast16_xor(atomic_fast16_t *a, atomic_fast16_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

atomic_fast8_int_t atomic_fast8_add(atomic_fast8_t *a, atomic_fast8_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

atomic_fast8_int_t atomic_fast8_and(atomic_fast8_t *a, atomic_fast8_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

void atomic_fast8_bit_clr(atomic_fast8_t *a, uint_fast8_t n)  

this function atomically clears bit in integer value in memory

void atomic_fast8_bit_set(atomic_fast8_t *a, uint_fast8_t n)  

this function atomically sets bit in integer value in memory

bool_t atomic_fast8_bit_test(atomic_fast8_t *a, uint_fast8_t n)  

this function tests bit in integer value in memory

The return value is 0 if bit is cleared.

bool_t atomic_fast8_bit_testclr(atomic_fast8_t *a, uint_fast8_t n)  

this function atomically tests and clears bit in integer value in memory

The return value is 0 if bit was cleared before.

bool_t atomic_fast8_bit_testset(atomic_fast8_t *a, uint_fast8_t n)  

this function atomically tests and sets bit in integer value in memory

The return value is 0 if bit was cleared before.

bool_t atomic_fast8_compare_and_swap(atomic_fast8_t *a, atomic_fast8_int_t old, atomic_fast8_int_t future)  

this function compares memory to old and replace with future if they are the same.

The return value is true if exchanged

bool_t atomic_fast8_dec(atomic_fast8_t *a)  

this function atomically decrements integer value in memory

The return value is 0 if the new value is 0.

atomic_fast8_int_t atomic_fast8_get(atomic_fast8_t *a)  

this function gets atomic integer value in memory

bool_t atomic_fast8_inc(atomic_fast8_t *a)  

this function atomically increments integer value in memory.

The return value is 0 if the new value is 0.

atomic_fast8_int_t atomic_fast8_or(atomic_fast8_t *a, atomic_fast8_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

void atomic_fast8_set(atomic_fast8_t *a, atomic_fast8_int_t value)  

this function sets atomic integer value in memory

atomic_fast8_int_t atomic_fast8_swap(atomic_fast8_t *a, atomic_fast8_int_t value)  

this function atomically swap a value in memory.

The return value is the previous value.

typedef struct arch_atomic_fast8_s atomic_fast8_t  

This typedef is declared in hexo/atomic.h source file, line 50.

atomic_fast8_int_t atomic_fast8_xor(atomic_fast8_t *a, atomic_fast8_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

atomic_int_t atomic_get(atomic_t *a)  

this function gets atomic integer value in memory

bool_t atomic_inc(atomic_t *a)  

this function atomically increments integer value in memory.

The return value is 0 if the new value is 0.

atomic_int_t atomic_or(atomic_t *a, atomic_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

void atomic_set(atomic_t *a, atomic_int_t value)  

this function sets atomic integer value in memory

atomic_int_t atomic_swap(atomic_t *a, atomic_int_t value)  

this function atomically swap a value in memory.

The return value is the previous value.

typedef struct arch_atomic_s atomic_t  

This typedef is declared in hexo/atomic.h source file, line 49.

Atomic value type

atomic_int_t atomic_xor(atomic_t *a, atomic_int_t value)  

this function atomically add a signed value to an integer value in memory.

The return value is the previous value.

Valid XHTML 1.0 StrictGenerated by diaxen on Wed Oct 17 21:18:38 2018 using MkDoc