eal: factorize common headers
[dpdk.git] / lib / librte_eal / common / include / rte_lcore.h
index 3802a28..a0b4356 100644 (file)
@@ -37,8 +37,7 @@
 /**
  * @file
  *
- * API for lcore and Socket Manipulation. Parts of this are execution
- * environment specific.
+ * API for lcore and socket manipulation
  *
  */
 #include <rte_per_lcore.h>
@@ -51,6 +50,27 @@ extern "C" {
 
 #define LCORE_ID_ANY -1    /**< Any lcore. */
 
+/**
+ * Structure storing internal configuration (per-lcore)
+ */
+struct lcore_config {
+       unsigned detected;         /**< true if lcore was detected */
+       pthread_t thread_id;       /**< pthread identifier */
+       int pipe_master2slave[2];  /**< communication pipe with master */
+       int pipe_slave2master[2];  /**< communication pipe with master */
+       lcore_function_t * volatile f;         /**< function to call */
+       void * volatile arg;       /**< argument of function */
+       volatile int ret;          /**< return value of function */
+       volatile enum rte_lcore_state_t state; /**< lcore state */
+       unsigned socket_id;        /**< physical socket id for this lcore */
+       unsigned core_id;          /**< core number on socket for this lcore */
+};
+
+/**
+ * Internal configuration (per-lcore)
+ */
+extern struct lcore_config lcore_config[RTE_MAX_LCORE];
+
 RTE_DECLARE_PER_LCORE(unsigned, _lcore_id); /**< Per core "core id". */
 
 /**
@@ -89,8 +109,6 @@ rte_lcore_count(void)
        return cfg->lcore_count;
 }
 
-#include <exec-env/rte_lcore.h>
-
 /**
  * Return the ID of the physical socket of the logical core we are
  * running on.