forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatomic.h
More file actions
39 lines (31 loc) · 772 Bytes
/
atomic.h
File metadata and controls
39 lines (31 loc) · 772 Bytes
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
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2018 Intel Corporation. All rights reserved.
*
* Author: Liam Girdwood <liam.r.girdwood@linux.intel.com>
*/
#ifndef __SOF_ATOMIC_H__
#define __SOF_ATOMIC_H__
#include <arch/atomic.h>
#include <stdint.h>
static inline void atomic_init(atomic_t *a, int32_t value)
{
arch_atomic_init(a, value);
}
static inline int32_t atomic_read(const atomic_t *a)
{
return arch_atomic_read(a);
}
static inline void atomic_set(atomic_t *a, int32_t value)
{
arch_atomic_set(a, value);
}
static inline int32_t atomic_add(atomic_t *a, int32_t value)
{
return arch_atomic_add(a, value);
}
static inline int32_t atomic_sub(atomic_t *a, int32_t value)
{
return arch_atomic_sub(a, value);
}
#endif /* __SOF_ATOMIC_H__ */