X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Finclude%2Fgeneric%2Frte_spinlock.h;h=54f83a4c56f25d72d1025ea16dea40c122596fbd;hb=cbf10af6ded52f42c68f9d01317750cb94204c66;hp=4e0a3c30186430f70be71569a07b9574e2f29297;hpb=ba7468997ea6dd7a019ea00367c56867eb6431e9;p=dpdk.git diff --git a/lib/librte_eal/common/include/generic/rte_spinlock.h b/lib/librte_eal/common/include/generic/rte_spinlock.h index 4e0a3c3018..54f83a4c56 100644 --- a/lib/librte_eal/common/include/generic/rte_spinlock.h +++ b/lib/librte_eal/common/include/generic/rte_spinlock.h @@ -51,6 +51,7 @@ #ifdef RTE_FORCE_INTRINSICS #include #endif +#include /** * 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