fix docs
authorkhizmax <libcds.dev@gmail.com>
Fri, 3 Oct 2014 18:30:36 +0000 (22:30 +0400)
committerkhizmax <libcds.dev@gmail.com>
Fri, 3 Oct 2014 18:30:36 +0000 (22:30 +0400)
cds/gc/hzp/hzp.h
cds/gc/ptb/ptb.h
cds/intrusive/treiber_stack.h
change.log
doxygen/cds.doxy
scripts/tab2space.pl [deleted file]

index 26cf409a4454bcc5a68619a28b2771cf9ec74303..59f50d9f2e12ab756ccf2c9e5a1381e5bcc8e96f 100644 (file)
@@ -462,11 +462,13 @@ namespace cds {
             details::HPRec *    m_pHzpRec       ; ///< Pointer to thread's HZP record
 
         public:
+            /// Default constructor
             ThreadGC()
                 : m_HzpManager( GarbageCollector::instance() ),
                 m_pHzpRec( nullptr )
             {}
 
+            /// The object is not copy-constructible
             ThreadGC( ThreadGC const& ) = delete;
 
             ~ThreadGC()
index 6605f92858d7b8552b835ea240a36842c55a793a..aa943932cc0eafaab71ee5f686a4deabbe88c020 100644 (file)
@@ -497,6 +497,7 @@ namespace cds { namespace gc {
                     : m_pGuard( nullptr )
                 {}
 
+                /// The object is not copy-constructible
                 guard( guard const& ) = delete;
 
                 /// Object destructor, does nothing
@@ -628,7 +629,10 @@ namespace cds { namespace gc {
             /// Allocates array of guards from \p gc which must be the ThreadGC object of current thread
             GuardArray( ThreadGC& gc )    ;    // inline below
 
+            /// The object is not default-constructible
             GuardArray() = delete;
+
+            /// The object is not copy-constructible
             GuardArray( GuardArray const& ) = delete;
 
             /// Returns guards allocated back to pool
@@ -899,12 +903,14 @@ namespace cds { namespace gc {
             details::guard_data *    m_pFree ;   ///< The list of free guard from m_pList
 
         public:
+            /// Default constructor
             ThreadGC()
                 : m_gc( GarbageCollector::instance() )
                 , m_pList( nullptr )
                 , m_pFree( nullptr )
             {}
 
+            /// The object is not copy-constructible
             ThreadGC( ThreadGC const& ) = delete;
 
             /// Dtor calls fini()
index d82c9576e59c80f3497a8bfbea146695497a1744..25787ac485792f90bd585e6cdb1db66c971c2640 100644 (file)
@@ -23,7 +23,7 @@ namespace cds { namespace intrusive {
         /**
             Template parameters:
             - GC - garbage collector used
-            - Tag -  this argument serves as \ref cds_intrusive_hook_tag "a tag"
+            - Tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template <class GC, typename Tag = opt::none >
         using node = cds::intrusive::single_link::node< GC, Tag > ;
@@ -32,7 +32,7 @@ namespace cds { namespace intrusive {
         /**
             \p Options are:
             - opt::gc - garbage collector used.
-            - opt::tag - \ref cds_intrusive_hook_tag "a tag"
+            - opt::tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template < typename... Options >
         using base_hook = cds::intrusive::single_link::base_hook< Options...>;
@@ -44,7 +44,7 @@ namespace cds { namespace intrusive {
 
             \p Options are:
             - opt::gc - garbage collector used.
-            - opt::tag - \ref cds_intrusive_hook_tag "a tag"
+            - opt::tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template < size_t MemberOffset, typename... Options >
         using member_hook = cds::intrusive::single_link::member_hook< MemberOffset, Options... >;
@@ -56,7 +56,7 @@ namespace cds { namespace intrusive {
 
             \p Options are:
             - opt::gc - garbage collector used.
-            - opt::tag - \ref cds_intrusive_hook_tag "a tag"
+            - opt::tag - a \ref cds_intrusive_hook_tag "tag"
         */
         template <typename NodeTraits, typename... Options >
         using traits_hook = cds::intrusive::single_link::traits_hook< NodeTraits, Options... >;
@@ -208,7 +208,7 @@ namespace cds { namespace intrusive {
             This is a wrapper for <tt> cds::opt::make_options< type_traits, Options...> </tt>
             Supported \p Options are:
 
-            - opt::hook - hook used. Possible values are: \p treiber_stack::base_hook, \p treiber_stack::member_hook, \p treiber_stack::traits_hook.
+            - opt::hook - hook used. Possible values are: treiber_stack::base_hook, treiber_stack::member_hook, treiber_stack::traits_hook.
                 If the option is not specified, \p %treiber_stack::base_hook<> is used.
             - opt::back_off - back-off strategy used. If the option is not specified, the \p cds::backoff::Default is used.
             - opt::disposer - the functor used for dispose removed items. Default is \p opt::v::empty_disposer. This option is used only
@@ -424,7 +424,7 @@ namespace cds { namespace intrusive {
 
         Template arguments:
         - \p GC - garbage collector type: gc::HP, gc::PTB. 
-            Garbage collecting schema must be consistent with the treiber_stack::node GC.
+            Garbage collecting schema must be consistent with the \p treiber_stack::node GC.
         - \p T - type to be inserted into the stack
         - \p Traits - stack traits, default is \p treiber_stack::traits. You can use \p treiber_stack::make_traits
             metafunction to make your traits or just derive your traits from \p %treiber_stack::traits:
@@ -433,6 +433,13 @@ namespace cds { namespace intrusive {
                 typedef cds::intrusive::treiber_stack::stat<> stat;
             };
             typedef cds::intrusive::TreiberStack< cds::gc::HP, Foo, myTraits > myStack;
+
+            // Equivalent make_traits example:
+            typedef cds::intrusive::TreiberStack< cds::gc::HP, Foo, 
+                typename cds::intrusive::treiber_stack::make_traits< 
+                    cds::opt::stat< cds::intrusive::treiber_stack::stat<> > 
+                >::type
+            > myStack;
             \endcode
 
         @note Be careful when you want destroy an item popped, see \ref cds_intrusive_item_destroying "Destroying items of intrusive containers".
@@ -443,7 +450,7 @@ namespace cds { namespace intrusive {
         Example of how to use \p treiber_stack::base_hook.
         Your class that objects will be pushed on \p %TreiberStack should be based on \p treiber_stack::node class
         \code
-        #include <cds/intrusive/stack/treiber_stack.h>
+        #include <cds/intrusive/treiber_stack.h>
         #include <cds/gc/hp.h>
 
         namespace ci = cds::intrusive;
@@ -457,7 +464,9 @@ namespace cds { namespace intrusive {
         // Stack type
         typedef ci::TreiberStack< gc,
             myData,
-            ci::opt::hook< ci::treiber_stack::base_hook< gc > >
+            typename cds::intrusive::treiber_stack::make_traits<
+                ci::opt::hook< ci::treiber_stack::base_hook< gc > >
+            >::type
         > stack_t;
 
         // Stack with elimination back-off enabled
@@ -472,7 +481,7 @@ namespace cds { namespace intrusive {
 
         Example of how to use \p treiber_stack::base_hook with different tags.
         \code
-        #include <cds/intrusive/stack/treiber_stack.h>
+        #include <cds/intrusive/treiber_stack.h>
         #include <cds/gc/hp.h>
 
         namespace ci = cds::intrusive;
@@ -499,11 +508,11 @@ namespace cds { namespace intrusive {
         typedef ci::TreiberStack< gc, 
             myData, 
             typename ci::treiber_stack::make_traits<
-                ci::opt::hook< ci::treiber_stack::base_hook< gc, tag2 > 
+                ci::opt::hook< ci::treiber_stack::base_hook< gc, tag2 > >
             >::type
         > stack2_t;
 
-        // You may add myData objects in the objects of type stack1_t and stack2_t independently
+        // You may add myData objects into stack1_t and stack2_t independently
         void foo() {
             stack1_t    s1;
             stack2_t    s2;
@@ -527,7 +536,7 @@ namespace cds { namespace intrusive {
         Your class that will be pushed on \p %TreiberStack should have a member of type \p treiber_stack::node
         \code
         #include <stddef.h>     // offsetof macro
-        #include <cds/intrusive/stack/treiber_stack.h>
+        #include <cds/intrusive/treiber_stack.h>
         #include <cds/gc/hp.h>
 
         namespace ci = cds::intrusive;
@@ -543,7 +552,7 @@ namespace cds { namespace intrusive {
         typedef ci::TreiberStack< gc, 
             myData,
             typename ci::treiber_stack::make_traits<
-                ci::opt::hook< ci::treiber_stack::member_hook< offsetof(myData, member_hook_), gc >
+                ci::opt::hook< ci::treiber_stack::member_hook< offsetof(myData, member_hook_), gc >>
             >::type
         > stack_t;
         \endcode
index 126b3db50105ad02d8a8c69647cc4f8e3dcfed21..acc33a43f99eba0f25323267520ea3c89429cfa4 100644 (file)
@@ -3,6 +3,7 @@
     - switch to C++11 standard
     - Removed: MichaelDeque, reason: the implementation is heavy-weighted, inefficient,
       and, seems, unstable.
+    - Added: cds::container::TreiberStack::pop_with( Func )
 
 1.6.0 23.09.2014
     General release
index 03587f9b8c25bdf162e02587636d7cd0e9e0d64d..cf679bfa8dec4896902fb034e254ab25e5f6470e 100644 (file)
@@ -1401,6 +1401,7 @@ PREDEFINED             = CDS_BUILD_BITS=64 \
                          CDS_CXX11_DECLTYPE_SUPPORT \
                          CDS_NOEXCEPT=noexcept() \
                          CDS_CONSTEXPR=constexpr \
+                         CDS_CONSTEXPR_CONST="constexpr const" \
                          CDS_ATOMIC=std \
                          CDS_DELETE_SPECIFIER="=delete"\
                          CDS_DEFAULT_SPECIFIER="=default"
diff --git a/scripts/tab2space.pl b/scripts/tab2space.pl
deleted file mode 100644 (file)
index 6fb1bf6..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-\r
-\r
-sub processDir( $ )\r
-{\r
-       my $dirName = shift ;\r
-       \r
-       opendir(my $dh, $dirName) || die "can't opendir $dirName: $!";\r
-    my @files = grep { /^[^\.]/ } readdir($dh);\r
-    closedir $dh;\r
-       \r
-       foreach my $file ( @files ) {\r
-               if ( -d "$dirName/$file" ) {\r
-                       processDir("$dirName/$file")    ;\r
-               }\r
-               elsif ( $file =~ /\.(h|cpp)$/ ) {\r
-                       processFile( "$dirName/$file" ) ;\r
-               }\r
-       }\r
-}\r
-\r
-sub processFile( $ ) \r
-{\r
-       my $file = shift        ;\r
-       \r
-       if ( open( my $fh, $file )) {\r
-               binmode $fh     ;\r
-               my $str = ''            ;\r
-               my $bTabified = 0       ;\r
-               while (<$fh>) {\r
-                       my $s = $_      ;\r
-                       if ( $str eq '' ) {\r
-                               unless ( $s =~ m#//\$\$CDS-header\$\$# ) {\r
-                                       $str .= '//$$CDS-header$$'."\n\n"       ;\r
-                                       $bTabified = 1  ;\r
-                               }\r
-                       }\r
-                       while ( $s =~ /\t/ ) {\r
-                               #print "pos=", $+[0], "\n"      ;\r
-                               $bTabified = 1  ;\r
-                               my $pos = $+[0] ;\r
-                               if ( $pos ) {\r
-                                       $pos -= 1       ;\r
-                                       if ( $pos % 4 == 0 ) {\r
-                                               $s =~ s/\t/    /        ;\r
-                                       }\r
-                                       elsif ( $pos % 4 == 1 ) {\r
-                                               $s =~ s/\t/   / ;\r
-                                       }\r
-                                       elsif ( $pos % 4 == 2 ) {\r
-                                               $s =~ s/\t/  /  ;\r
-                                       }\r
-                                       elsif ( $pos % 4 == 3 ) {\r
-                                               $s =~ s/\t/ /   ;\r
-                                       }\r
-                               }\r
-                       }\r
-                       $bTabified = 1 if $s =~ s/[\t ]+([\n\r]+)$/$1/ ;\r
-                       $str .= $s ;\r
-               }\r
-               close $fh       ;\r
-               \r
-               if ( $bTabified ) {\r
-                       print $file, "\n"       ;\r
-                       if ( open( my $fh, ">$file" )) {\r
-                               binmode $fh     ;\r
-                               print $fh $str  ;\r
-                               close $fh               ;\r
-                       }\r
-               }\r
-       }\r
-}\r
-\r
-chdir ('..') ;\r
-processDir('cds')      ;\r
-processDir('src')      ;\r
-processDir('tests/unit')       ;\r
-\r
-exit;
\ No newline at end of file