]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
assert: allow assertions inside calls to dout()
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 14 Feb 2011 15:20:57 +0000 (07:20 -0800)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Mon, 14 Feb 2011 15:20:57 +0000 (07:20 -0800)
commit16cd9173dd36dd73ffbb2fbca43ed1e215db12f1
treeacaffcd6c51a2639b89e790a0160716c006a71f5
parent373619264ef54e924c31509af5bee0c155978618
assert: allow assertions inside calls to dout()

We should handle the situation where we assert() while already holding
the dout() lock. At the same time, we want to get the dout lock if we
can, because it makes the logs look nicer. pthread_mutex_trylock solves
the dilemma.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
src/common/assert.cc