X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=cds%2Fintrusive%2Ffeldman_hashset_rcu.h;h=671f39907b8748f1aea90c76099cbf2f9c86cf20;hb=refs%2Fheads%2Fmaster;hp=8b97bfb3b74ca314e6b082d37755ad9e7ebb7316;hpb=e891296f3970a4d973ad69d732cb646dbbe820c5;p=libcds.git diff --git a/cds/intrusive/feldman_hashset_rcu.h b/cds/intrusive/feldman_hashset_rcu.h index 8b97bfb3..671f3990 100644 --- a/cds/intrusive/feldman_hashset_rcu.h +++ b/cds/intrusive/feldman_hashset_rcu.h @@ -1,11 +1,11 @@ /* This file is a part of libcds - Concurrent Data Structures library - (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016 + (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017 Source code repo: http://github.com/khizmax/libcds/ Download: http://sourceforge.net/projects/libcds/files/ - + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -25,7 +25,7 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef CDSLIB_INTRUSIVE_FELDMAN_HASHSET_RCU_H @@ -113,6 +113,9 @@ namespace cds { namespace intrusive { using exempt_ptr = cds::urcu::exempt_ptr< gc, value_type, value_type, disposer, void >; ///< pointer to extracted node + /// The size of hash_type in bytes, see \p feldman_hashset::traits::hash_size for explanation + static CDS_CONSTEXPR size_t const c_hash_size = base_class::c_hash_size; + //@cond typedef feldman_hashset::level_statistics level_statistics; //@endcond @@ -141,8 +144,8 @@ namespace cds { namespace intrusive { public: /// Creates empty set /** - @param head_bits: 2head_bits specifies the size of head array, minimum is 4. - @param array_bits: 2array_bits specifies the size of array node, minimum is 2. + @param head_bits - 2head_bits specifies the size of head array, minimum is 4. + @param array_bits - 2array_bits specifies the size of array node, minimum is 2. Equation for \p head_bits and \p array_bits: \code @@ -896,9 +899,10 @@ namespace cds { namespace intrusive { /** @anchor cds_intrusive_FeldmanHashSet_rcu_iterators The set supports thread-safe iterators: you may iterate over the set in multi-threaded environment under explicit RCU lock. - RCU lock requirement means that inserting or searching is allowed but you must not erase the items from the set - because erasing under RCU lock can lead to a deadlock. However, another thread can call \p erase() safely - while your thread is iterating. + + RCU lock requirement means that inserting or searching is allowed for iterating thread + but you must not erase the items from the set because erasing under RCU lock can lead + to a deadlock. However, another thread can call \p erase() safely while your thread is iterating. A typical example is: \code