[DPDK/core Bug 1882] volatile not needed with atomics

bugzilla at dpdk.org bugzilla at dpdk.org
Tue Feb 17 04:46:06 CET 2026


http://bugs.dpdk.org/show_bug.cgi?id=1882

            Bug ID: 1882
           Summary: volatile not needed with atomics
           Product: DPDK
           Version: 25.11
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: core
          Assignee: dev at dpdk.org
          Reporter: amardeepjk at gmail.com
  Target Milestone: ---

When we use atomic in c why are we using volatile.

Is it just for old compilers/ pre c11 versions?

typedef struct __rte_capability("spinlock") {
        volatile RTE_ATOMIC(int) locked; /**< lock status 0 = unlocked, 1 =
locked */
} rte_spinlock_t;

Can i raise a patch to remove it ?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the dev mailing list