Date: Sat, 1 May 2021 00:57:31 GMT From: Neel Chauhan <nc@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: bbdd27a5bc84 - stable/13 - linuxkpi: Implement rcu_replace_pointer() macro Message-ID: <202105010057.1410vVEB074362@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by nc (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=bbdd27a5bc8496b270d9f39d97f984d092411241 commit bbdd27a5bc8496b270d9f39d97f984d092411241 Author: Neel Chauhan <nc@FreeBSD.org> AuthorDate: 2021-04-28 15:04:52 +0000 Commit: Neel Chauhan <nc@FreeBSD.org> CommitDate: 2021-05-01 00:54:42 +0000 linuxkpi: Implement rcu_replace_pointer() macro This is needed for the drm-kmod 5.5 update. Reviewed by: hselasky (src) Differential Revision: https://reviews.freebsd.org/D30025 (cherry picked from commit efe7f12cd37bf8f2538df387d565e7849112a598) --- sys/compat/linuxkpi/common/include/linux/rcupdate.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/rcupdate.h b/sys/compat/linuxkpi/common/include/linux/rcupdate.h index a43736e0285f..ea97fecee53b 100644 --- a/sys/compat/linuxkpi/common/include/linux/rcupdate.h +++ b/sys/compat/linuxkpi/common/include/linux/rcupdate.h @@ -97,6 +97,13 @@ (uintptr_t)(v)); \ } while (0) +#define rcu_replace_pointer(rcu, ptr, c) \ +({ \ + typeof(ptr) __tmp = rcu_dereference_protected(rcu, c); \ + rcu_assign_pointer(rcu, ptr); \ + __tmp; \ +}) + #define rcu_swap_protected(rcu, ptr, c) do { \ typeof(ptr) p = rcu_dereference_protected(rcu, c); \ rcu_assign_pointer(rcu, ptr); \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202105010057.1410vVEB074362>