The write lock will be taken when the new state is applied.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
template <typename I>
int ImageState<I>::refresh_if_required() {
- RWLock::RLocker owner_locker(m_image_ctx->owner_lock);
- return refresh_if_required(m_image_ctx->owner_lock);
-}
-
-template <typename I>
-int ImageState<I>::refresh_if_required(const RWLock &) {
- assert(m_image_ctx->owner_lock.is_locked());
-
C_SaferCond ctx;
{
Mutex::Locker locker(m_lock);
int refresh();
void refresh(Context *on_finish);
int refresh_if_required();
- int refresh_if_required(const RWLock &owner_lock);
void snap_set(const std::string &snap_name, Context *on_finish);