blob: 3aeaa6c5b6caec7c08cac9fc069e86a1498ec198 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* Copyright 2022 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef __CROS_EC_ATOMIC_BIT_H
#define __CROS_EC_ATOMIC_BIT_H
#ifndef CONFIG_ZEPHYR
#include "atomic.h"
static inline atomic_val_t atomic_get(const atomic_t *target)
{
return __atomic_load_n(target, __ATOMIC_SEQ_CST);
}
#include "third_party/zephyr/atomic.h"
#endif /* CONFIG_ZEPHYR */
#endif /* __CROS_EC_ATOMIC_BIT_H */
|