Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Functions for atomic operation.

Reply
Thread Tools

Functions for atomic operation.

 
 
Srinu
Guest
Posts: n/a
 
      09-30-2009
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
 
Reply With Quote
 
 
 
 
Nick Keighley
Guest
Posts: n/a
 
      09-30-2009
On 30 Sep, 06:10, Srinu <(E-Mail Removed)> wrote:

> 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...)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ANN] atomic 0.0.1 - An atomic reference for Ruby Charles Oliver Nutter Ruby 5 06-08-2010 01:04 PM
Why are functions atomic? Michael Python 31 05-08-2007 12:35 AM
Breaking a date pattern into its atomic elements Jacques Vidal Java 1 07-21-2004 03:46 PM
please help me in distinguish redefining functions, overloading functions and overriding functions. Xiangliang Meng C++ 1 06-21-2004 03:11 AM
Atomic Clock - Applet Ravi Sandhu Java 2 02-18-2004 08:58 AM



Advertisments