gpg: When the TOFU DB is in batch mode, periodically drop the locks.
authorNeal H. Walfield <neal@g10code.com>
Mon, 26 Oct 2015 12:36:12 +0000 (13:36 +0100)
committerNeal H. Walfield <neal@g10code.com>
Mon, 26 Oct 2015 12:41:59 +0000 (13:41 +0100)
commit5b0ed7674dc718ee98e0c80aa93ce014f2b51411
tree9d385a5465ba7e662b26a5b252a4928f92bcad9c
parent5e7ac031f513ad3b60e4f092fa72b3bec0676515
gpg: When the TOFU DB is in batch mode, periodically drop the locks.

* g10/tofu.c: Include <sched.h>.
(batch_update_started): New variable.
(begin_transaction): If we've been in batch mode for a while, then
commit any extant batch transactions.
(tofu_begin_batch_update): If we are not in batch mode, initialize
batch_update_started.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
g10/tofu.c