]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/common/include/generic/rte_cycles.h
eal: add nanosleep based delay function
[dpdk.git] / lib / librte_eal / common / include / generic / rte_cycles.h
index 0ff1af50470e00a3d049113c458ad16a36703200..ac379e8780d00603f833337c2b8e73f0b18757a2 100644 (file)
@@ -13,6 +13,7 @@
  */
 
 #include <stdint.h>
+#include <rte_compat.h>
 #include <rte_debug.h>
 #include <rte_atomic.h>
 
@@ -157,6 +158,16 @@ rte_delay_ms(unsigned ms)
  */
 void rte_delay_us_block(unsigned int us);
 
+/**
+ * Delay function that uses system sleep.
+ * Does not block the CPU core.
+ *
+ * @param us
+ *   Number of microseconds to wait.
+ */
+void __rte_experimental
+rte_delay_us_sleep(unsigned int us);
+
 /**
  * Replace rte_delay_us with user defined function.
  *