p***@workinghard.com
2008-12-19 20:19:27 UTC
We have a formerly Windows program that uses InterlockedIncrement.
## InterlockedIncrement Function
##
## Increments (increases by one) the value of the specified 32-bit
## variable as an atomic operation.
We are porting that program to Linux and would like to know the
fastest way of performing the same operation without heavyweight
objects like mutexes being involved.
Google searches reveal some assembly language instructions, but we do
not want to use assembly, preferably it should be a function from
glibc.
## InterlockedIncrement Function
##
## Increments (increases by one) the value of the specified 32-bit
## variable as an atomic operation.
We are porting that program to Linux and would like to know the
fastest way of performing the same operation without heavyweight
objects like mutexes being involved.
Google searches reveal some assembly language instructions, but we do
not want to use assembly, preferably it should be a function from
glibc.