/**
The function initializes \p CDS library framework.
Before usage of \p CDS library features your application must initialize it
- by calling \p Initialize function:
- @code
- #include <cds/init.h>
- #include <cds/gc/hp.h>
+ by calling \p %Initialize() function, see \ref cds_how_to_use "how to use the library".
- int main()
- {
- // // Initialize CDS library
- cds::Initialize( 0 );
-
- {
- // // Initialize Hazard Pointer GC (if it is needed for you)
- cds::gc::HP();
-
- // // Now you can use CDS library containers with Hazard Pointer GC
- ...
-
- }
- // // Teminate CDS library
- cds::Terminate();
-
- return 0;
- }
- @endcode
-
- You may call \p Initialize several times, only first call is significant others will be ignored.
- To terminate the \p CDS library correctly, each call to \p Initialize must be balanced by a corresponding call to \ref Terminate.
+ You can call \p Initialize several times, only first call is significant others will be ignored.
+ To terminate the \p CDS library correctly, each call to \p %Initialize() must be balanced
+ by a corresponding \p Terminate() call.
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.
+ GC-specific constructor function to initialize internal structures of GC.
+ See \p cds::gc for details.
*/
static inline void Initialize(
unsigned int nFeatureFlags = 0 ///< for future use, must be zero.
/// Terminate CDS library
/**
This function terminates \p CDS library.
- After \p Terminate calling many features of the library are unavailable.
- This call should be the last call of \p CDS library in your application.
+ After \p %Terminate() calling many features of the library are unavailable.
+ This call should be the last call of \p CDS library in your application,
+ see \ref cds_how_to_use "how to use the library".
*/
static inline void Terminate()
{