Functions for atomic operation.

S

Srinu

Dear All,

Is there any functions available in standard C library or in the
library that comes with gcc, which can do atomic increaments and
atomic decrements? (other atomic operations optional... though highly
preferable...)

for example, functions like this:

atomic_inc();
atomic_dec();

so that for such small operations user need not write its own
functions using semaphore or mutex. This could be handy while
programming for parallel processes or threads.

Thanks
Srinu
 
N

Nick Keighley

Is there any functions available in standard C library or in the
library that comes with gcc, which can do atomic increaments and
atomic decrements?

<snip>

there is no way to do this in standard C. You need to ask in a gcc
group (or maybe posix, or amybe...)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top