who can give me an example for atomicExch()?

I want to add a float number to another one with the atomic function.
I find only the atomicExch can be used to the float number.
but did’t find any helpful example in the manual and SDK .
So, who can show me how to do that?