atomic operations under linux

atomic operations under linux

guy keren choo at actcom.co.il
Wed Dec 9 18:49:43 IST 2009


Erez D wrote:
> hi
> 
> hi do i do atomic operations in linux (userspace) ?
> 
> i need somthing like testAndSet32()
> 
> 
> thanks,
> erez.

you need to use inline assembly to do this.

it looks like glib has support for atomic operation (thought i've never 
used it).

also, g++ seems to have support for atomic operations,as a non-standard 
extention.


--guy



More information about the Linux-il mailing list