Nucleus
Barry Per-CPU Scheduler bb0cb77 (3 years, 2 months ago)
diff --git a/include/nucleus/object.h b/include/nucleus/object.h
index 9683410..70e7bc1 100644
--- a/include/nucleus/object.h
+++ b/include/nucleus/object.h
@@ -49,6 +49,7 @@ struct Object {
enum ListMode {
LIST_NORMAL,
LIST_ORDERED,
+ LIST_LOCKLESS,
};
int check(void *addr);
@@ -80,6 +81,6 @@ void *prev(Iterator *iter);
int done_iterating(Iterator *iter);
#define foreach(l,i) for (Iterator *(__l_ ## i) = iterate(l); (__l_ ## i); \
done_iterating(__l_ ## i), (__l_ ## i) = NULL) \
- for (i = first(__l_ ## i); i; i = next(__l_ ## i))
+ for ((i) = first(__l_ ## i); (i); (i) = next(__l_ ## i))
#endif