From ef5cf40fa6d3e2f50ad916be8e5bd99affe7d2e3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 31 Jan 2012 22:12:14 +0100 Subject: directory: require the caller to lock the db_mutex Reduce the number of lock/unlock cycles, and make database handling safer. --- src/database.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/database.h') diff --git a/src/database.h b/src/database.h index 33f503652..9c50bb15e 100644 --- a/src/database.h +++ b/src/database.h @@ -50,6 +50,9 @@ db_finish(void); struct directory * db_get_root(void); +/** + * Caller must lock the #db_mutex. + */ gcc_nonnull(1) struct directory * db_get_directory(const char *name); -- cgit v1.2.3