tm::shadow() must take a validator

This commit is contained in:
Joe Thornber 2011-11-08 11:14:30 +00:00
parent d3d42c5f54
commit 2cb8f1308b
2 changed files with 0 additions and 21 deletions

View File

@ -46,26 +46,6 @@ transaction_manager::new_block(validator v)
return wr;
}
// FIXME: make exception safe
pair<transaction_manager::write_ref, bool>
transaction_manager::shadow(block_address orig)
{
if (is_shadow(orig) &&
!sm_->count_possibly_greater_than_one(orig))
return make_pair(bm_->write_lock(orig), false);
read_ref src = bm_->read_lock(orig);
write_ref dest = bm_->write_lock_zero(sm_->new_block());
::memcpy(dest.data(), src.data(), MD_BLOCK_SIZE);
ref_t count = sm_->get_count(orig);
if (count == 0)
throw runtime_error("shadowing free block");
sm_->dec(orig);
add_shadow(dest.get_location());
return make_pair(dest, count > 1);
}
// FIXME: duplicate code
pair<transaction_manager::write_ref, bool>
transaction_manager::shadow(block_address orig, validator v)

View File

@ -33,7 +33,6 @@ namespace persistent_data {
// shadowing returns a new write_ref, and a boolean which
// indicates whether the children should be incremented.
std::pair<write_ref, bool> shadow(block_address orig);
std::pair<write_ref, bool> shadow(block_address orig, validator v);
read_ref read_lock(block_address b);