src/server/ucx/atomic.h

changeset 41
bb7a1f5a8b48
parent 40
56cda23f48d4
child 42
cb9c63c1edee
equal deleted inserted replaced
40:56cda23f48d4 41:bb7a1f5a8b48
1 /*
2 * File: atomic.h
3 * Author: olaf
4 *
5 * Created on 29. Mai 2012, 09:38
6 */
7
8 #ifndef ATOMIC_H
9 #define ATOMIC_H
10
11 #include <inttypes.h>
12
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16
17 void ucx_atomic_inc_8(volatile uint8_t *t);
18
19 void ucx_atomic_inc_16(volatile uint16_t *t);
20
21 void ucx_atomic_inc_32(volatile uint32_t *t);
22
23 void ucx_atomic_inc_64(volatile uint64_t *t);
24
25 void ucx_atomic_dec_8(volatile uint8_t *t);
26
27 void ucx_atomic_dec_16(volatile uint16_t *t);
28
29 void ucx_atomic_dec_32(volatile uint32_t *t);
30
31 void ucx_atomic_dec_64(volatile uint64_t *t);
32
33 uint8_t ucx_atomic_dec_8_nv(volatile uint8_t *t);
34
35 uint16_t ucx_atomic_dec_16_nv(volatile uint16_t *t);
36
37 uint32_t ucx_atomic_dec_32_nv(volatile uint32_t *t);
38
39 uint64_t ucx_atomic_dec_64_nv(volatile uint64_t *t);
40
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif /* ATOMIC_H */
47

mercurial