]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common: SharedMutex uses ref-counted implementation 22698/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 23 May 2018 20:35:42 +0000 (16:35 -0400)
committerCasey Bodley <cbodley@redhat.com>
Tue, 26 Jun 2018 19:03:42 +0000 (15:03 -0400)
commit9f0f8f3c629e96cb39f94ab38407c9022d5fa3d4
treeb45b5e0b85589d287cc8707653724b09b9b16cfd
parent36d3a8f984cdb764357906c8aa14702fdb72bae2
common: SharedMutex uses ref-counted implementation

add a reference-counted SharedMutexImpl so that lock guards can outlive
the SharedMutex itself. this is required because the lock guards are
passed with async completions, and there is no guarantee that the
executor will process those completions before the SharedMutex
destructs. this case is exercised by the async_destruct unit test

Fixes: http://tracker.ceph.com/issues/24124
Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/common/async/detail/shared_lock.h [new file with mode: 0644]
src/common/async/detail/shared_mutex.h [new file with mode: 0644]
src/common/async/shared_mutex.h