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
@ -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…
x
Reference in New Issue
Block a user