On Mon, 23 May 2022 16:23:46 +0200
Mattias Rönnblom <mattias.ronnb...@ericsson.com> wrote:

> +/**
> + * The RTE seqcount type.
> + */
> +typedef struct {
> +     uint32_t sn; /**< A sequence number for the protected data. */
> +} rte_seqcount_t;

Don't need structure for only one element.

typedef uint32_t rte_seqcount_t;

+       if (unlikely(begin_sn != end_sn))
+               return true;
+
+       return false;

Prefer to avoid conditional if possible (compiler will optimize it as):

        return begin_sn == end_sn;

Reply via email to