question on atomics

is it possible to realize a function which works atomic on three ints?

I can think of three ways why you might want to do that, three different answers.
Can you say why three atomic operations is a problem ?

A silly method:

//marker is a global integer. It indicates the locking state of the 3 integers you need to atomically operate on
//marker = 0 means the 3 integers are not locked
//marker = 1 means the 3 integers are locked

while(atomicMax(marker, 1)==1) {} //keep looping if marker is 1
//code enters this region only when marker is set to 0 by the previous owner of the 3 integers
//however, the atomixMax(marker, 1) would have again set the marker to 1, which disables other threads from entering this region
//do your necessary processing here
atomicExch(marker, 0); //release the lock

With direct access to the hardware things should be much easier. There are instructions like LDLK (load and lock) and STULK (store and unlock).
Though I never heard anyone had experimented with those instructions yet. I will try that when I got time…