bool BitMapZone::is_exhausted()
{
debug_assert(check_locked());
- if (get_used_blocks() == size()) {
- return true;
- } else {
- return false;
- }
+ return get_used_blocks() == size();
}
bool BitMapZone::is_allocated(int64_t start_block, int64_t num_blocks)
bool BitMapZone::lock_excl_try()
{
- if (m_lock.try_lock()) {
- return true;
- }
- return false;
+ return m_lock.try_lock();
}
void BitMapZone::unlock()
bool BitMapAreaIN::is_exhausted()
{
- if (get_used_blocks() == size()) {
- return true;
- }
- return false;
+ return get_used_blocks() == size();
}
int64_t BitMapAreaIN::add_used_blocks(int64_t blks)