aboutsummaryrefslogtreecommitdiff
path: root/src/database.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-01-31 22:12:14 +0100
committerMax Kellermann <max@duempel.org>2012-02-02 18:06:33 +0100
commitef5cf40fa6d3e2f50ad916be8e5bd99affe7d2e3 (patch)
treebffd4ea35f30f96e8dc8d1ac74184bd4dab5d5d6 /src/database.h
parent837bd79b20d4b9b8525a42999a9d1911f8980aa4 (diff)
directory: require the caller to lock the db_mutex
Reduce the number of lock/unlock cycles, and make database handling safer.
Diffstat (limited to 'src/database.h')
-rw-r--r--src/database.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/database.h b/src/database.h
index 33f50365..9c50bb15 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);