+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_GC_EXCEPTION_H
-#define __CDS_GC_EXCEPTION_H
-
-#include <cds/details/defs.h>
-
-namespace cds { namespace gc {
-
- /// %Exception "Too few hazard pointers"
- CDS_DECLARE_EXCEPTION( too_few_hazard_pointers, "Too few hazard pointers" );
-
-}} // namespace cds::gc
-
-#endif // #ifndef __CDS_GC_EXCEPTION_H
#ifndef __CDS_GC_HP_DECL_H
#define __CDS_GC_HP_DECL_H
+#include <stdexcept> // overflow_error
#include <cds/gc/hzp/hzp.h>
#include <cds/details/marked_ptr.h>
/// Checks if count of hazard pointer is no less than \p nCountNeeded
/**
- If \p bRaiseException is \p true (that is the default), the function raises an exception gc::too_few_hazard_pointers
+ If \p bRaiseException is \p true (that is the default), the function raises
+ an \p std::overflow_error exception "Too few hazard pointers"
if \p nCountNeeded is more than the count of hazard pointer per thread.
*/
static bool check_available_guards( size_t nCountNeeded, bool bRaiseException = true )
{
if ( hzp::GarbageCollector::instance().getHazardPointerCount() < nCountNeeded ) {
if ( bRaiseException )
- throw cds::gc::too_few_hazard_pointers();
+ throw std::overflow_error( "Too few hazard pointers" );
return false;
}
return true;
#include <vector>
#include <cds/cxx11_atomic.h>
#include <cds/os/thread.h>
-#include <cds/gc/exception.h>
#include <cds/gc/hzp/details/hp_fwd.h>
#include <cds/gc/hzp/details/hp_alloc.h>
#include <cds/gc/hzp/details/hp_retired.h>
<ClInclude Include="..\..\..\cds\details\static_functor.h" />\r
<ClInclude Include="..\..\..\cds\gc\all.h" />\r
<ClInclude Include="..\..\..\cds\gc\dhp.h" />\r
- <ClInclude Include="..\..\..\cds\gc\exception.h" />\r
<ClInclude Include="..\..\..\cds\gc\gc_fwd.h" />\r
<ClInclude Include="..\..\..\cds\gc\guarded_ptr.h" />\r
<ClInclude Include="..\..\..\cds\gc\hp_decl.h" />\r
<ClInclude Include="..\..\..\cds\container\cuckoo_map.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\gc\exception.h">\r
- <Filter>Header Files\cds\gc</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\intrusive\skip_list_hp.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r