Skip to contentSkip to conversation

volatile not needed with atomics

DPDK/core Bug 1882 [email protected] 1 participant 1 message Feb 17

lore
Share & tools
lore
#0 lore raw

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: [email protected]
          Reporter: [email protected]

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 ?

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.