aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibapi/api_common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vlibapi/api_common.h')
-rw-r--r--src/vlibapi/api_common.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vlibapi/api_common.h b/src/vlibapi/api_common.h
index fac4c96ee3c..c3ef57338bc 100644
--- a/src/vlibapi/api_common.h
+++ b/src/vlibapi/api_common.h
@@ -369,7 +369,14 @@ typedef struct
} api_main_t;
-extern api_main_t api_main;
+extern __thread api_main_t *my_api_main;
+extern api_main_t api_global_main;
+
+always_inline api_main_t *
+vlibapi_get_main (void)
+{
+ return my_api_main;
+}
#endif /* included_api_common_h */