Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/export.h>
4#include <linux/spinlock.h>
5
6void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
7 struct lock_class_key *key)
8{
9#ifdef CONFIG_DEBUG_SPINLOCK
10 __raw_spin_lock_init(spinlock_check(lock), name, key, LD_WAIT_CONFIG);
11#else
12 spin_lock_init(lock);
13#endif
14}
15
16void rust_helper_spin_lock(spinlock_t *lock)
17{
18 spin_lock(lock);
19}
20
21void rust_helper_spin_unlock(spinlock_t *lock)
22{
23 spin_unlock(lock);
24}