]> git.ozlabs.org Git - ccan/commit
tdb2: fix tdb_chainlock
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 15 Nov 2010 07:24:15 +0000 (17:54 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 15 Nov 2010 07:24:15 +0000 (17:54 +1030)
commitc5e3f07a30056cb7c3c380bf690f80815ca4b6b1
tree92f0bd97a2d3e237f982af6461ecef812943c4f8
parent06a5b1a852c207a5172922e39d8effab0dd17b91
tdb2: fix tdb_chainlock

We can't enlarge the lock without risking deadlock, so tdb_chainlock() can't
simply grab a one-byte lock; it needs to grab the lock we'd need to protect
the hash.

In theory, tdb_chainlock_read() could use a one-byte lock though.
ccan/tdb2/hash.c
ccan/tdb2/lock.c