atomic_inc man page on Mandriva

Man page or keyword search:  
man Server   17060 pages
apropos Keyword Search (all sections)
Output format
Mandriva logo
[printable version]

atomic_add(9)		       Kernel Functions			 atomic_add(9)

NAME
       atomic_add, atomic_sub, atomic_inc, atomic_dec - thread/SMP safe
       arithmetic on atomic data

SYNOPSIS
       #include <asm/atomic.h>

       void atomic_add(int i, volatile atomic_t*v)
       void atomic_sub(int i, volatile atomic_t*v)
       void atomic_inc(volatile atomic_t*v)
       void atomic_dec(volatile atomic_t*v)
       int atomic_read(volatile atomic_t*v)
       void atomic_set(volatile atomic_t*v, int i)
       int atomic_dec_and_test(volatile atomic_t*v)

DESCRIPTION
       These functions manipulate variables of type atomic_t is SMP and inter‐
       rupt  safe ways. These variables can be used to hold spin locks or SMP-
       safe reference counters. These functions guarantee that	the  operation
       that  they represent is performed correctly. If necessary, hardware bus
       locking is performed to protect the operation.  Usually,	 the  CPU  has
       some sort of atomic instructions that allow these operations to be per‐
       formed quickly and safely.

       The atomic_dec_and_test decrements the  atomic  variable,  and  returns
       true  if	 the  result  is zero. This function is particularly useful in
       implementing spin locks on SMP systems.

RETURN VALUE
       The atomic_read function returns the integer value of the atomic	 vari‐
       able.

       The  atomic_dec_and_test	 returns  TRUE if the value becomes zero after
       the decrement.

AVAILABILITY
       Linux 2.0+

SEE ALSO
       intro(9)

AUTHOR
       Stephen Williams <steve@icarus.com>

BUGS
       The read and set operations generally have no special protections.

Linux DDI			    $Date:$			 atomic_add(9)
[top]

List of man pages available for Mandriva

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net