xref: /openbsd/sys/dev/pci/drm/include/linux/rcupdate.h (revision 733a71f2)
1 /* Public domain. */
2 
3 #ifndef LINUX_RCUPDATE_H
4 #define LINUX_RCUPDATE_H
5 
6 #include <linux/cpumask.h>
7 
8 struct rcu_head {
9 };
10 
11 #define __rcu
12 #define rcu_dereference(p)	(p)
13 #define rcu_dereference_raw(p)	(p)
14 #define rcu_dereference_protected(p, c)	(p)
15 #define rcu_dereference_check(p, c)	(p)
16 #define rcu_access_pointer(p)	(p)
17 #define RCU_INIT_POINTER(p, v)		do { (p) = (v); } while(0)
18 #define rcu_assign_pointer(p, v)	do { (p) = (v); } while(0)
19 #define rcu_read_lock()
20 #define rcu_read_unlock()
21 #define rcu_pointer_handoff(p)	(p)
22 #define init_rcu_head(h)
23 #define destroy_rcu_head(h)
24 
25 #define rcu_replace_pointer(rp, p, c)		\
26 ({						\
27 	__typeof(rp) __r = rp;			\
28 	rp = p;					\
29 	__r;					\
30 })
31 
32 #define kfree_rcu(objp, name)	do { free((void *)objp, M_DRM, 0); } while(0)
33 
34 #define rcu_barrier()		__asm volatile("" : : : "memory")
35 
36 typedef void (*rcu_callback_t)(struct rcu_head *head);
37 
38 static inline void
call_rcu(struct rcu_head * head,void (* fn)(struct rcu_head *))39 call_rcu(struct rcu_head *head, void (*fn)(struct rcu_head *))
40 {
41 	fn(head);
42 }
43 
44 #define synchronize_rcu()
45 #define synchronize_rcu_expedited()
46 #define cond_synchronize_rcu(x)
47 #define get_state_synchronize_rcu()	0
48 
49 #endif
50