]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_eal/common/include/generic/rte_spinlock.h
pci: avoid inlining functions
[dpdk.git] / lib / librte_eal / common / include / generic / rte_spinlock.h
index 4e0a3c30186430f70be71569a07b9574e2f29297..54f83a4c56f25d72d1025ea16dea40c122596fbd 100644 (file)
@@ -51,6 +51,7 @@
 #ifdef RTE_FORCE_INTRINSICS
 #include <rte_common.h>
 #endif
+#include <rte_pause.h>
 
 /**
  * The rte_spinlock_t type.
@@ -127,7 +128,7 @@ rte_spinlock_trylock (rte_spinlock_t *sl);
 static inline int
 rte_spinlock_trylock (rte_spinlock_t *sl)
 {
-       return (__sync_lock_test_and_set(&sl->locked,1) == 0);
+       return __sync_lock_test_and_set(&sl->locked,1) == 0;
 }
 #endif