atomic.h

atomic add func [詳細]

#include <coil/Mutex.h>
#include <coil/Guard.h>

ソースコードを見る。

マクロ定義

#define COIL_USES_ATOMIC_OP   coil::Mutex __mutex;
#define atomic_add(x, y)
#define atomic_incr(x)
#define atomic_decr(x)
#define atomic_exchange_add(x, y)   exchange_add(x, y, &__mutex)

関数

int exchange_add (int *x, int y, coil::Mutex *mutex)

説明

atomic add func

日付:
$Date$
作者:
Noriaki Ando <n-ando@aist.go.jp>

Copyright (C) 2008 Noriaki Ando Task-intelligence Research Group, Intelligent Systems Research Institute, National Institute of Advanced Industrial Science and Technology (AIST), Japan All rights reserved.

$Id$


マクロ定義

#define atomic_add ( x,
 ) 
値:
{                                             \
    coil::Guard<coil::Mutex> guard(__mutex);    \
    *x = *x + y;                                \
  }
#define atomic_decr (  ) 
値:
{                                             \
    coil::Guard<coil::Mutex> guard(__mutex);    \
    --(*x);                                     \
  }
#define atomic_exchange_add ( x,
 )     exchange_add(x, y, &__mutex)
#define atomic_incr (  ) 
値:
{                                             \
    coil::Guard<coil::Mutex> guard(__mutex);    \
    ++(*x);                                     \
  }
#define COIL_USES_ATOMIC_OP   coil::Mutex __mutex;

関数

int exchange_add ( int *  x,
int  y,
coil::Mutex mutex 
)
OpenRTM-aistに対してFri Oct 28 18:31:15 2016に生成されました。  doxygen 1.6.3