Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

New Developer
Posts: 16
Registered: ‎07-26-2012
My Device: PlayBook, Dev Alpha
My Carrier: Heyah

Atomic Swap ?

Hi I know there is :

atomic_add((volatile unsigned *)value, 1);

atomic_sub((volatile unsigned *)value, 1);

for atomic inc and dec,


but is there any way to do atomic swap ?

Is atomic_set_value() an equivalent of this ?


and what about compare and swap ?


Thanks Smiley Happy