eal: introduce driver init macros
[dpdk.git] / lib / librte_eal / common / include / rte_eal.h
index 98d20db..d150b9d 100644 (file)
@@ -253,6 +253,9 @@ static inline int rte_gettid(void)
        return RTE_PER_LCORE(_thread_id);
 }
 
+#define RTE_INIT(func) \
+static void __attribute__((constructor, used)) func(void)
+
 #ifdef __cplusplus
 }
 #endif