]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_mempool/rte_mempool.h
use appropriate EAL macro for constructors
[dpdk.git] / lib / librte_mempool / rte_mempool.h
index 7c9cd9a2f60fbf6a6455df2d904342e6b3a4fb69..fd19470d72973f945f36fb2251501c08f416bc7b 100644 (file)
@@ -832,10 +832,9 @@ int rte_mempool_register_ops(const struct rte_mempool_ops *ops);
  * Note that the rte_mempool_register_ops fails silently here when
  * more than RTE_MEMPOOL_MAX_OPS_IDX is registered.
  */
-#define MEMPOOL_REGISTER_OPS(ops)                                      \
-       void mp_hdlr_init_##ops(void);                                  \
-       void __attribute__((constructor, used)) mp_hdlr_init_##ops(void)\
-       {                                                               \
+#define MEMPOOL_REGISTER_OPS(ops)                              \
+       RTE_INIT(mp_hdlr_init_##ops)                            \
+       {                                                       \
                rte_mempool_register_ops(&ops);                 \
        }