From f4f2a794535883955bfde8e75d4f9f9e34b5afb6 Mon Sep 17 00:00:00 2001 From: khizmax Date: Sun, 30 Nov 2014 15:33:43 +0300 Subject: [PATCH] doc improvements --- cds/init.h | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/cds/init.h b/cds/init.h index 60085809..654661fe 100644 --- a/cds/init.h +++ b/cds/init.h @@ -21,36 +21,15 @@ namespace cds { /** 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 - #include + 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. @@ -72,8 +51,9 @@ namespace cds { /// 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() { -- 2.34.1