summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cee02f0)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
-CFLAGS=-Wall -O2 -g -I.
-#debug
-#CFLAGS=-Wall -g
+CFLAGS=-Wall -I.
+
+#optimized
+CFLAGS+=-O2
+
+#debug information
+CFLAGS+=-g
+
+#RCU debug (slower, with error-checks)
+#CFLAGS+=-DDEBUG_RCU
DEBUG_RCU is used to add internal debugging self-checks to the
RCU library. This define adds a performance penality when enabled.
DEBUG_RCU is used to add internal debugging self-checks to the
RCU library. This define adds a performance penality when enabled.
+ Can be enabled by uncommenting the corresponding line in
+ Makefile.build.inc.
#include <stdlib.h>
#include <pthread.h>
#include <stdlib.h>
#include <pthread.h>
#include <compiler.h>
#include <arch.h>
#include <compiler.h>
#include <arch.h>
*/
#define KICK_READER_LOOPS 10000
*/
#define KICK_READER_LOOPS 10000
+#ifdef DEBUG_RCU
+#define rcu_assert(args...) assert(args)
+#else
+#define rcu_assert(args...)
+#endif
+
#ifdef DEBUG_YIELD
#include <sched.h>
#include <time.h>
#ifdef DEBUG_YIELD
#include <sched.h>
#include <time.h>
static inline void _rcu_read_lock(void)
{
static inline void _rcu_read_lock(void)
{
+ rcu_assert(rcu_reader_qs_gp & 1);
}
static inline void _rcu_read_unlock(void)
}
static inline void _rcu_read_unlock(void)