mirror of
https://github.com/torvalds/linux.git
synced 2025-04-06 00:16:18 +00:00

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>
14 lines
189 B
C
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();
|
|
}
|