cds  1.3.0
Namespaces | Data Structures | Typedefs | Functions
cds Namespace Reference

The main library namespace. More...

Namespaces

namespace  atomicity
 Atomic primitives.
 
namespace  backoff
 Different backoff schemes.
 
namespace  beans
 Some helper compile-time tricks.
 
namespace  bitop
 Bit operations.
 
namespace  container
 Standard (non-intrusive) containers.
 
namespace  cxx11_atomics
 C++11 Atomic library support.
 
namespace  details
 Helper classes and functions.
 
namespace  gc
 Different safe memory reclamation schemas (garbage collectors)
 
namespace  intrusive
 Intrusive containers.
 
namespace  lock
 Synchronization primitives.
 
namespace  memory
 Memory-related algorithms: allocators etc.
 
namespace  opt
 Framework to define template options.
 
namespace  OS
 OS specific wrappers.
 
namespace  threading
 Threading support.
 

Data Structures

struct  bounded_container
 Bounded container. More...
 
class  Exception
 Base of all exceptions in the library. More...
 
struct  any_type
 any_type is used as a placeholder for auto-calculated type (usually in rebind templates) More...
 
class  ref_counter
 Simple reference counter. More...
 

Typedefs

typedef lock::Spin SpinLock
 Standard (best for the current platform) spin-lock implementation.
 
typedef lock::ReentrantSpin RecursiveSpinLock
 Standard (best for the current platform) recursive spin-lock implementation.
 
typedef lock::ReentrantSpin32 RecursiveSpinLock32
 32bit recursive spin-lock shortcut
 
typedef lock::ReentrantSpin64 RecursiveSpinLock64
 64bit recursive spin-lock shortcut
 
typedef lock::AutoSpin AutoSpinLock
 Auto spin-lock shortcut.
 
typedef ref_counter< cds::int32_t > signed_ref_counter
 Signed 32bit reference counter.
 
typedef ref_counter
< cds::uint32_t > 
unsigned_ref_counter
 Unsigned 32bit reference counter.
 

Functions

static void Initialize (unsigned int nFeatureFlags=0)
 Initialize CDS library.
 
static void Terminate ()
 Terminate CDS library.
 

Detailed Description

The main library namespace.

Function Documentation

static void cds::Initialize ( unsigned int  nFeatureFlags = 0)
inlinestatic

Initialize CDS library.

The function initializes CDS library framework. Before usage of CDS library features your application must initialize it by calling Initialize function:

#include <cds/init.h>
#include <cds/gc/hp.h>
int main()
{
// // Initialize CDS library
{
// // Initialize Hazard Pointer GC (if it is needed for you)
// // Now you can use CDS library containers with Hazard Pointer GC
...
}
// // Teminate CDS library
return 0 ;
}

You may call Initialize several times, only first call is significant others will be ignored. To terminate the CDS library correctly, each call to Initialize must be balanced by a corresponding call to Terminate.

Note, that this function does not initialize garbage collectors. To use GC you need you should call GC-specific constructor function to initialize internal structures of GC. See cds::gc and its subnamespace for details.

Parameters
nFeatureFlagsfor future use, must be zero.
static void cds::Terminate ( )
inlinestatic

Terminate CDS library.

This function terminates CDS library. After Terminate calling many features of the library are unavailable. This call should be the last call of CDS library in your application.


cds 1.3.0 Developed by Maxim Khiszinsky aka khizmax 2007 - 2012
Autogenerated Sat Dec 29 2012 19:12:30 by Doxygen 1.8.3