1 // SPDX-License-Identifier: GPL-2.0 2 3 #include <linux/export.h> 4 #include <linux/spinlock.h> 5 6 void 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 EXPORT_SYMBOL_GPL(rust_helper___spin_lock_init); 16 17 void rust_helper_spin_lock(spinlock_t *lock) 18 { 19 spin_lock(lock); 20 } 21 EXPORT_SYMBOL_GPL(rust_helper_spin_lock); 22 23 void rust_helper_spin_unlock(spinlock_t *lock) 24 { 25 spin_unlock(lock); 26 } 27 EXPORT_SYMBOL_GPL(rust_helper_spin_unlock); 28