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