#ifndef COMPAT_RCUPDATE_H
#define COMPAT_RCUPDATE_H

#include_next <linux/rcupdate.h>

/* Include the autogenerated header file */
#include "../../compat/config.h"

#ifndef rcu_replace_pointer
#define rcu_replace_pointer(rcu_ptr, ptr, c)				\
({									\
	typeof(ptr) __tmp = rcu_dereference_protected((rcu_ptr), (c));	\
	rcu_assign_pointer((rcu_ptr), (ptr));				\
	__tmp;								\
})
#endif

#endif /* COMPAT_RCUPDATE_H */
