aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlib/threads.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2017-03-08 19:08:56 -0500
committerOle Trøan <otroan@employees.org>2017-03-09 19:07:17 +0000
commit80f54e20270ed0628ee725e3e3c515731a0188f2 (patch)
treefa06d939942af6f5126ee645c38cb787814bfb6f /src/vlib/threads.h
parentb3b2de71ceea0cc7ce18f89cc8180ed4a42e355d (diff)
vlib_mains == 0 special cases be gone
Clean up spurious binary API client link dependency on libvlib.so, which managed to hide behind vlib_mains == 0 checks reached by VLIB_xxx_FUNCTION macros. Change-Id: I5df1f8ab07dca1944250e643ccf06e60a8462325 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/vlib/threads.h')
-rw-r--r--src/vlib/threads.h43
1 files changed, 19 insertions, 24 deletions
diff --git a/src/vlib/threads.h b/src/vlib/threads.h
index 75a5a2818fb..a032311c689 100644
--- a/src/vlib/threads.h
+++ b/src/vlib/threads.h
@@ -222,30 +222,25 @@ vlib_worker_thread_barrier_check (void)
}
}
-#define foreach_vlib_main(body) \
-do { \
- vlib_main_t ** __vlib_mains = 0, *this_vlib_main; \
- int ii; \
- \
- if (vec_len (vlib_mains) == 0) \
- vec_add1 (__vlib_mains, &vlib_global_main); \
- else \
- { \
- for (ii = 0; ii < vec_len (vlib_mains); ii++) \
- { \
- this_vlib_main = vlib_mains[ii]; \
- if (this_vlib_main) \
- vec_add1 (__vlib_mains, this_vlib_main); \
- } \
- } \
- \
- for (ii = 0; ii < vec_len (__vlib_mains); ii++) \
- { \
- this_vlib_main = __vlib_mains[ii]; \
- /* body uses this_vlib_main... */ \
- (body); \
- } \
- vec_free (__vlib_mains); \
+#define foreach_vlib_main(body) \
+do { \
+ vlib_main_t ** __vlib_mains = 0, *this_vlib_main; \
+ int ii; \
+ \
+ for (ii = 0; ii < vec_len (vlib_mains); ii++) \
+ { \
+ this_vlib_main = vlib_mains[ii]; \
+ if (this_vlib_main) \
+ vec_add1 (__vlib_mains, this_vlib_main); \
+ } \
+ \
+ for (ii = 0; ii < vec_len (__vlib_mains); ii++) \
+ { \
+ this_vlib_main = __vlib_mains[ii]; \
+ /* body uses this_vlib_main... */ \
+ (body); \
+ } \
+ vec_free (__vlib_mains); \
} while (0);
#define foreach_sched_policy \