24 std::scoped_lock lock(
mutex_);
26 for (LabelBlockList::iterator it =
blocks_.begin();
29 if (block->
first_ == first && block->
last_ == last) {
40 for (LabelBlockList::iterator it =
blocks_.begin();
51 std::scoped_lock lock(
mutex_);
56 : block_manager_(NULL),
65 : block_manager_(block_manager),
79 std::scoped_lock lock(
mutex_);
92 return static_cast<uint32_t
>(
first_ + pos);
100 std::scoped_lock lock(
mutex_);
103 size_t pos = value -
first_;
109 snprintf(repr,
sizeof(repr),
"%u-%u",
first_,
last_);
size_t find_first_clear() const
BitSet & reset(size_t pos)
size_t find_next_clear(size_t pos) const
LabelBlockPtr LocateBlock(uint32_t first, uint32_t last)
std::atomic< int > refcount_
void RemoveBlock(LabelBlock *block)
std::atomic< int > refcount_
LabelBlockManagerPtr block_manager_
LabelBlock(uint32_t first, uint32_t last)
std::string ToString() const
void ReleaseLabel(uint32_t value)
boost::intrusive_ptr< LabelBlock > LabelBlockPtr