Imported Upstream version 17.05
[deb_dpdk.git] / examples / performance-thread / common / lthread_pool.h
index a5f3251..fb0c578 100644 (file)
 #ifndef LTHREAD_POOL_H_
 #define LTHREAD_POOL_H_
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <rte_malloc.h>
 #include <rte_per_lcore.h>
 #include <rte_log.h>
@@ -138,14 +142,14 @@ _qnode_pool_create(const char *name, int prealloc_size) {
                                        RTE_CACHE_LINE_SIZE,
                                        rte_socket_id());
 
-       LTHREAD_ASSERT(p);
+       RTE_ASSERT(p);
 
        p->stub = rte_malloc_socket(NULL,
                                sizeof(struct qnode),
                                RTE_CACHE_LINE_SIZE,
                                rte_socket_id());
 
-       LTHREAD_ASSERT(p->stub);
+       RTE_ASSERT(p->stub);
 
        if (name != NULL)
                strncpy(p->name, name, LT_MAX_NAME_SIZE);
@@ -328,5 +332,8 @@ _qnode_pool_destroy(struct qnode_pool *p)
        return 0;
 }
 
+#ifdef __cplusplus
+}
+#endif
 
 #endif                         /* LTHREAD_POOL_H_ */