VPP is just a C app. So you can use standard C atomics… Have you tried to do something like “git grep atomic” in the vpp repo ?
— Damjan > On 05.06.2021., at 19:39, Mohanty, Chandan (Nokia - IN/Bangalore) > <[email protected]> wrote: > > VPP experts, > Any pointers on this will be much appreciated and help a VPP learning guy. > > ------------------------------------------------------------------------------------------------------------ > Wanted to know, Similar to Linux, if any atomic operation is available in VPP? > Intention is to use atomic operations in place of Locking. > > Linux: > long atomic64_add_return(int i, atomic64_t *v) Atomically add i to v and > return the result > long atomic64_sub_return(int i, atomic64_t *v) Atomically subtract i from v > and return the result > > int atomic_sub_return(int i, atomic_t *v) Atomically subtract i from v and > return the result > int atomic_add_return(int i, atomic_t *v) Atomically add i to v and return > the result. > > VPP: > ?? > ------------------------------------------------------------------------------------------------------------- > > Regards > Chandan > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19533): https://lists.fd.io/g/vpp-dev/message/19533 Mute This Topic: https://lists.fd.io/mt/83277899/21656 Mute #vpp:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp Mute #counters:https://lists.fd.io/g/vpp-dev/mutehashtag/counters Mute #vpp-dev:https://lists.fd.io/g/vpp-dev/mutehashtag/vpp-dev Group Owner: [email protected] Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
