mirror of
https://github.com/opnsense/src.git
synced 2026-03-11 02:31:16 -04:00
linuxkpi: Implement rcu_replace_pointer() macro
This is needed for the drm-kmod 5.5 update. Reviewed by: hselasky (src) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D30025
This commit is contained in:
parent
d1e9441583
commit
efe7f12cd3
1 changed files with 7 additions and 0 deletions
|
|
@ -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); \
|
||||
|
|
|
|||
Loading…
Reference in a new issue