eal: add API to lock/unlock tailq list
[dpdk.git] / lib / librte_eal / common / include / rte_eal_memconfig.h
index a22709f..240fa15 100644 (file)
@@ -86,6 +86,9 @@ struct rte_mem_config {
        /* legacy mem and single file segments options are shared */
        uint32_t legacy_mem;
        uint32_t single_file_segments;
+
+       /* keeps the more restricted dma mask */
+       uint8_t dma_maskbits;
 } __attribute__((__packed__));
 
 
@@ -97,6 +100,54 @@ rte_eal_mcfg_wait_complete(struct rte_mem_config* mcfg)
                rte_pause();
 }
 
+/**
+ * Lock the internal EAL shared memory configuration for shared access.
+ */
+void
+rte_mcfg_mem_read_lock(void);
+
+/**
+ * Unlock the internal EAL shared memory configuration for shared access.
+ */
+void
+rte_mcfg_mem_read_unlock(void);
+
+/**
+ * Lock the internal EAL shared memory configuration for exclusive access.
+ */
+void
+rte_mcfg_mem_write_lock(void);
+
+/**
+ * Unlock the internal EAL shared memory configuration for exclusive access.
+ */
+void
+rte_mcfg_mem_write_unlock(void);
+
+/**
+ * Lock the internal EAL TAILQ list for shared access.
+ */
+void
+rte_mcfg_tailq_read_lock(void);
+
+/**
+ * Unlock the internal EAL TAILQ list for shared access.
+ */
+void
+rte_mcfg_tailq_read_unlock(void);
+
+/**
+ * Lock the internal EAL TAILQ list for exclusive access.
+ */
+void
+rte_mcfg_tailq_write_lock(void);
+
+/**
+ * Unlock the internal EAL TAILQ list for exclusive access.
+ */
+void
+rte_mcfg_tailq_write_unlock(void);
+
 #ifdef __cplusplus
 }
 #endif