Wedson Almeida Filho 5115820729 rust: add rcu abstraction
Add a simple abstraction to guard critical code sections with an rcu
read lock.

Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
Co-developed-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Tested-by: Dirk Behme <dirk.behme@de.bosch.com>
Tested-by: Fabien Parent <fabien.parent@linaro.org>
Link: https://lore.kernel.org/r/20241219170425.12036-5-dakr@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-20 17:19:26 +01:00

14 lines
189 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/rcupdate.h>
void rust_helper_rcu_read_lock(void)
{
rcu_read_lock();
}
void rust_helper_rcu_read_unlock(void)
{
rcu_read_unlock();
}