[lttng-dev] Typo in urcu_qsbr.h ?
Dmitri Shubin
sbn at tbricks.com
Tue Oct 8 04:09:37 EDT 2013
Hi,
In urcu_qsbr.h I can see the following
85 /*
86 * QSBR read lock/unlock are guaranteed to be no-ops.
Therefore, we expose them
87 * in the LGPL header for any code to use. However, the debug
version is not
88 * nops and may contain sanity checks. To activate it,
applications must be
89 * recompiled with -DRCU_DEBUG (even non-LGPL/GPL
applications). This is the
90 * best trade-off between license/performance/code triviality and
91 * library debugging & tracing features we could come up with.
92 */
93
94 #if (!defined(BUILD_QSBR_LIB) && defined(RCU_DEBUG))
95
96 static inline void rcu_read_lock(void)
97 {
98 }
99
100 static inline void rcu_read_unlock(void)
101 {
102 }
103
104 #else /* !RCU_DEBUG */
105
106 extern void rcu_read_lock(void);
107 extern void rcu_read_unlock(void);
108
109 #endif /* !RCU_DEBUG */
Shouldn't the condition in line 94 actually be
94 #if (!defined(BUILD_QSBR_LIB) && !defined(RCU_DEBUG))
So when RCU_DEBUG is _not_ defined we get static inlines for
rcu_read_{,un}lock() ?
Thanks!
More information about the lttng-dev
mailing list