forked from parallella/pal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
p_atomic_or.c
44 lines (35 loc) · 826 Bytes
/
p_atomic_or.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <pal.h>
#include "pal_base.h"
#include "pal_base_private.h"
uint8_t p_atomic_or_u8(uint8_t * atom, uint8_t n)
{
return __sync_fetch_and_or(atom, n);
}
uint16_t p_atomic_or_u16(uint16_t * atom, uint16_t n)
{
return __sync_fetch_and_or(atom, n);
}
uint32_t p_atomic_or_u32(uint32_t * atom, uint32_t n)
{
return __sync_fetch_and_or(atom, n);
}
uint64_t p_atomic_or_u64(uint64_t * atom, uint64_t n)
{
return __sync_fetch_and_or(atom, n);
}
int8_t p_atomic_or_i8(int8_t * atom, int8_t n)
{
return __sync_fetch_and_or(atom, n);
}
int16_t p_atomic_or_i16(int16_t * atom, int16_t n)
{
return __sync_fetch_and_or(atom, n);
}
int32_t p_atomic_or_i32(int32_t * atom, int32_t n)
{
return __sync_fetch_and_or(atom, n);
}
int64_t p_atomic_or_i64(int64_t * atom, int64_t n)
{
return __sync_fetch_and_or(atom, n);
}