From d670d0a09bec3b6900421df17fc9d959545ee953 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 11 Jul 2008 17:44:09 +0200 Subject: Revert "Remove gencache_[un]lock_entry" This reverts commit 7a5a575ffe5196caecedc93970a25abfbe6f8059. (This used to be commit 62e444dd50ae974c2ab9a553cdf7f188a8f2c538) --- source3/lib/gencache.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'source3/lib') diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c index a55b2ab9ba..1b4342a62b 100644 --- a/source3/lib/gencache.c +++ b/source3/lib/gencache.c @@ -484,3 +484,28 @@ void gencache_iterate(void (*fn)(const char* key, const char *value, time_t time tdb_search_list_free(first_node); } + +/******************************************************************** + lock a key +********************************************************************/ + +int gencache_lock_entry( const char *key ) +{ + if (!gencache_init()) + return -1; + + return tdb_lock_bystring(cache, key); +} + +/******************************************************************** + unlock a key +********************************************************************/ + +void gencache_unlock_entry( const char *key ) +{ + if (!gencache_init()) + return; + + tdb_unlock_bystring(cache, key); + return; +} -- cgit