Re: s/Mutex/ceph::mutex/, lockdep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 13 Mar 2018, Jesse Williamson wrote:
> On Tue, 13 Mar 2018, Gregory Farnum wrote:
> 
> > Otherwise, this sounds like a fine idea to me. Trying to unify these
> > behaviors from a code style perspective is long overdue given our
> > other modernization efforts. :)
> 
> Total agreement-- and, FWIW, /besides/ lockdep, every single Mutex and Cond
> call can absolutely be replaced with the C++ standard library at this point.

I think one wrinkle is that we have lots of lines like

  assert(lock.is_locked_by_me());

sprinkled about, usually at the top of internal _foo() methods.  I don't 
think there is a std::mutex equivalent (that operates on the mutex itself 
and not a std::unique_lock).

I'm not sure if it's worth trying to keep something like this around for 
the debug_mutex... I think we'd need to create some sort of macro 
like ASSERT_MUTEX_LOCKED(lock) that compiles away to nothing in the 
std::mutex case?

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux