25 lines · c
1// SPDX-License-Identifier: GPL-2.02 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_SPINLOCK10 __raw_spin_lock_init(spinlock_check(lock), name, key, LD_WAIT_CONFIG);11#else12 spin_lock_init(lock);13#endif14}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}25