diff options
author | Max Kellermann <max@duempel.org> | 2012-01-31 22:12:14 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2012-02-02 18:06:33 +0100 |
commit | ef5cf40fa6d3e2f50ad916be8e5bd99affe7d2e3 (patch) | |
tree | bffd4ea35f30f96e8dc8d1ac74184bd4dab5d5d6 /src/database.h | |
parent | 837bd79b20d4b9b8525a42999a9d1911f8980aa4 (diff) | |
download | mpd-ef5cf40fa6d3e2f50ad916be8e5bd99affe7d2e3.tar.gz mpd-ef5cf40fa6d3e2f50ad916be8e5bd99affe7d2e3.tar.xz mpd-ef5cf40fa6d3e2f50ad916be8e5bd99affe7d2e3.zip |
directory: require the caller to lock the db_mutex
Reduce the number of lock/unlock cycles, and make database handling
safer.
Diffstat (limited to '')
-rw-r--r-- | src/database.h | 3 |
1 files changed, 3 insertions, 0 deletions
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); |