]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/librbd/mock/MockImageCtx.cc
import 15.2.0 Octopus source
[ceph.git] / ceph / src / test / librbd / mock / MockImageCtx.cc
CommitLineData
7c673cae
FG
1// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2// vim: ts=8 sw=2 smarttab
3
4#include "test/librbd/mock/MockImageCtx.h"
9f95a23c
TL
5#include "test/librbd/mock/MockSafeTimer.h"
6
7static MockSafeTimer *s_timer;
8static ceph::mutex *s_timer_lock;
7c673cae
FG
9
10namespace librbd {
11
12MockImageCtx* MockImageCtx::s_instance = nullptr;
13
9f95a23c
TL
14void MockImageCtx::set_timer_instance(MockSafeTimer *timer,
15 ceph::mutex *timer_lock) {
16 s_timer = timer;
17 s_timer_lock = timer_lock;
18}
19
20void MockImageCtx::get_timer_instance(CephContext *cct, MockSafeTimer **timer,
21 ceph::mutex **timer_lock) {
22 *timer = s_timer;
23 *timer_lock = s_timer_lock;
24}
25
7c673cae 26} // namespace librbd