summaryrefslogtreecommitdiff
path: root/source3/lib/gencache.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/gencache.c')
-rw-r--r--source3/lib/gencache.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/source3/lib/gencache.c b/source3/lib/gencache.c
index 40b4d1390d..58e44e3f0b 100644
--- a/source3/lib/gencache.c
+++ b/source3/lib/gencache.c
@@ -347,3 +347,24 @@ 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 )
+{
+ return tdb_lock_bystring(cache, key, 0);
+}
+
+/********************************************************************
+ unlock a key
+********************************************************************/
+
+void gencache_unlock_entry( const char *key )
+{
+ tdb_unlock_bystring(cache, key);
+ return;
+}
+
+