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
12#ifndef __ZEPHYR_RTOS_SPINLOCK_H__
13#define __ZEPHYR_RTOS_SPINLOCK_H__
14
15#include <zephyr/kernel.h>
16#include <zephyr/spinlock.h>
17
25static inline void k_spinlock_init(struct k_spinlock *lock)
26{
27#ifdef CONFIG_SMP
28 atomic_set(&lock->locked, 0);
29#endif
30}
31
32#endif /* __ZEPHYR_RTOS_SPINLOCK_H__ */
static void k_spinlock_init(struct k_spinlock *lock)
Initialize a spinlock structure to the unlocked state.
Definition spinlock.h:25