]>
Commit | Line | Data |
---|---|---|
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 | ||
7 | static MockSafeTimer *s_timer; | |
8 | static ceph::mutex *s_timer_lock; | |
7c673cae FG |
9 | |
10 | namespace librbd { | |
11 | ||
12 | MockImageCtx* MockImageCtx::s_instance = nullptr; | |
13 | ||
9f95a23c TL |
14 | void MockImageCtx::set_timer_instance(MockSafeTimer *timer, |
15 | ceph::mutex *timer_lock) { | |
16 | s_timer = timer; | |
17 | s_timer_lock = timer_lock; | |
18 | } | |
19 | ||
20 | void 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 |