libcopp  1.2.1
Data Structures | Namespaces | Macros | Enumerations
atomic_int_type.h File Reference

整数类型的原子操作跨平台适配 Licensed under the MIT licenses. More...

#include "std/explicit_declare.h"
#include <limits.h>
#include <stdint.h>
#include <cstddef>
#include "config/compile_optimize.h"
#include "config/compiler_features.h"
Include dependency graph for atomic_int_type.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

class  util::lock::atomic_int_type< Ty >
 
struct  util::lock::unsafe_int_type< Ty >
 
class  util::lock::atomic_int_type< unsafe_int_type< Ty > >
 

Namespaces

 util
 
 util::lock
 

Macros

#define _UNDEF__STDC_LIMIT_MACROS
 
#define __STDC_LIMIT_MACROS
 
#define _UNDEF__STDC_CONSTANT_MACROS
 
#define __STDC_CONSTANT_MACROS
 
#define UTIL_LOCK_ATOMIC_THREAD_FENCE(x)
 
#define UTIL_LOCK_ATOMIC_SIGNAL_FENCE(x)
 

Enumerations

enum  util::lock::memory_order {
  util::lock::memory_order_relaxed = 0, util::lock::memory_order_consume, util::lock::memory_order_acquire, util::lock::memory_order_release,
  util::lock::memory_order_acq_rel, util::lock::memory_order_seq_cst, util::lock::memory_order_relaxed = 0, util::lock::memory_order_consume,
  util::lock::memory_order_acquire, util::lock::memory_order_release, util::lock::memory_order_acq_rel, util::lock::memory_order_seq_cst
}
 

Detailed Description

整数类型的原子操作跨平台适配 Licensed under the MIT licenses.

Version
1.0
Author
OWenT
Date
2016-06-14
Note
VC 2012+, GCC 4.4 + 使用C++0x/11实现实现原子操作
低版本 VC使用InterlockedExchange等实现原子操作
低版本 GCC采用__sync_lock_test_and_set等实现原子操作

2016-06-14

Definition in file atomic_int_type.h.

Macro Definition Documentation

#define __STDC_CONSTANT_MACROS

Definition at line 38 of file atomic_int_type.h.

#define __STDC_LIMIT_MACROS

Definition at line 34 of file atomic_int_type.h.

#define _UNDEF__STDC_CONSTANT_MACROS

Definition at line 37 of file atomic_int_type.h.

#define _UNDEF__STDC_LIMIT_MACROS

Definition at line 33 of file atomic_int_type.h.

#define UTIL_LOCK_ATOMIC_SIGNAL_FENCE (   x)

Definition at line 331 of file atomic_int_type.h.

#define UTIL_LOCK_ATOMIC_THREAD_FENCE (   x)