m_replayer->stop(&stop_cond);
int r = start_cond.wait();
printf("start returned %d\n", r);
- // TODO: improve the test to avoid this race // TODO: improve the test to avoid this race
- ASSERT_TRUE(r == -EINTR || r == 0);
+ // TODO: improve the test to avoid this race
+ ASSERT_TRUE(r == -ECANCELED || r == 0);
ASSERT_EQ(0, stop_cond.wait());
}
{
Mutex::Locker locker(m_lock);
m_state = STATE_STOPPING;
- if (r < 0 && r != -EINTR) {
+ if (r < 0 && r != -ECANCELED) {
derr << "start failed: " << cpp_strerror(r) << dendl;
} else {
- dout(20) << "start interrupted" << dendl;
+ dout(20) << "start canceled" << dendl;
}
std::swap(m_on_start_finish, on_start_finish);
}
return false;
}
- on_start_fail(-EINTR);
+ on_start_fail(-ECANCELED);
return true;
}