X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_stack%2Frte_stack_lf_generic.h;h=31821514f042b31905d1d61eca9ef20e51bcd846;hb=8ef48d5333d916fe8826f1e3139796c5e889ad2e;hp=1191406d37b047d8f36463bfb1af6b058906b715;hpb=3340202f5954a4fbba62332c4aad29af67701188;p=dpdk.git diff --git a/lib/librte_stack/rte_stack_lf_generic.h b/lib/librte_stack/rte_stack_lf_generic.h index 1191406d37..31821514f0 100644 --- a/lib/librte_stack/rte_stack_lf_generic.h +++ b/lib/librte_stack/rte_stack_lf_generic.h @@ -26,7 +26,8 @@ __rte_stack_lf_count(struct rte_stack *s) * elements. If the mempool is near-empty to the point that this is a * concern, the user should consider increasing the mempool size. */ - return (unsigned int)rte_atomic64_read(&s->stack_lf.used.len); + return (unsigned int)rte_atomic64_read((rte_atomic64_t *) + &s->stack_lf.used.len); } static __rte_always_inline void @@ -73,7 +74,7 @@ __rte_stack_lf_push_elems(struct rte_stack_lf_list *list, __ATOMIC_RELAXED); } while (success == 0); - rte_atomic64_add(&list->len, num); + rte_atomic64_add((rte_atomic64_t *)&list->len, num); #endif } @@ -96,7 +97,7 @@ __rte_stack_lf_pop_elems(struct rte_stack_lf_list *list, /* Reserve num elements, if available */ while (1) { - uint64_t len = rte_atomic64_read(&list->len); + uint64_t len = rte_atomic64_read((rte_atomic64_t *)&list->len); /* Does the list contain enough elements? */ if (unlikely(len < num))