Sound Open Firmware
Loading...
Searching...
No Matches
spinlock.h
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// Copyright(c) 2020 Intel Corporation. All rights reserved.
4//
5
6#ifndef __ZEPHYR_RTOS_SPINLOCK_H__
7#define __ZEPHYR_RTOS_SPINLOCK_H__
8
9#include <zephyr/kernel.h>
10#include <zephyr/spinlock.h>
11
12/* not implemented on Zephyr, but used within SOF */
13static inline void k_spinlock_init(struct k_spinlock *lock)
14{
15#ifdef CONFIG_SMP
16 atomic_set(&lock->locked, 0);
17#endif
18}
19
20#endif /* __ZEPHYR_RTOS_SPINLOCK_H__ */
static void k_spinlock_init(struct k_spinlock *lock)
Definition spinlock.h:13