namespace librados {
static void finish_aio_completion(AioCompletionImpl *c, int r) {
- c->lock.Lock();
+ c->lock.lock();
c->complete = true;
c->rval = r;
- c->lock.Unlock();
+ c->lock.unlock();
rados_callback_t cb_complete = c->callback_complete;
void *cb_complete_arg = c->callback_complete_arg;
cb_safe(c, cb_safe_arg);
}
- c->lock.Lock();
+ c->lock.lock();
c->callback_complete = NULL;
c->callback_safe = NULL;
- c->cond.Signal();
+ c->cond.notify_all();
c->put_unlock();
}
int ret = m_callback();
if (m_comp != NULL) {
if (m_finisher != NULL) {
- m_finisher->queue(new FunctionContext(boost::bind(
+ m_finisher->queue(new LambdaContext(boost::bind(
&finish_aio_completion, m_comp, ret)));
} else {
finish_aio_completion(m_comp, ret);
struct WaitForFlush {
int flushed() {
if (--count == 0) {
- aio_finisher->queue(new FunctionContext(boost::bind(
+ aio_finisher->queue(new LambdaContext(boost::bind(
&finish_aio_completion, c, 0)));
delete this;
}
void TestRadosClient::flush_aio_operations() {
AioCompletionImpl *comp = new AioCompletionImpl();
flush_aio_operations(comp);
- comp->wait_for_safe();
+ comp->wait_for_complete();
comp->put();
}
int TestRadosClient::aio_watch_flush(AioCompletionImpl *c) {
c->get();
- Context *ctx = new FunctionContext(boost::bind(
+ Context *ctx = new LambdaContext(boost::bind(
&TestRadosClient::finish_aio_completion, this, c, _1));
get_watch_notify()->aio_flush(this, ctx);
return 0;