ObjectContext::lock is used only for implementing read_lock and
write_lock. PG::lock is used to protect the ObjectContexts
belonging to a pg.
Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
Reviewed-by: Josh Durgin <josh.durgin@dreamhost.com>
ReplicatedPG *pg = static_cast<ReplicatedPG *>(lookup_lock_raw_pg(oiter->second));
assert(pg);
- obc->lock.Lock();
watch_lock.Lock();
/* NOTE! fix this one, should be able to just lookup entity name,
however, we currently only keep EntityName on the session and not
++witer;
}
watch_lock.Unlock();
- obc->lock.Unlock();
pg->put_object_context(obc);
/* now drop a reference to that obc */
pg->unlock();
SnapSetContext *ssc; // may be null
+ private:
Mutex lock;
+ public:
Cond cond;
int unstable_writes, readers, writers_waiting, readers_waiting;