diff options
author | Volker Lendecke <vl@samba.org> | 2008-07-11 17:44:09 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2008-07-11 17:53:25 +0200 |
commit | d670d0a09bec3b6900421df17fc9d959545ee953 (patch) | |
tree | 0f772cbe645829c2f92219a04f4fad03cd0a27b4 /source3/lib | |
parent | d803fa6e46c98cc6cdcacfb0225388d786617f0a (diff) | |
download | samba-d670d0a09bec3b6900421df17fc9d959545ee953.tar.gz samba-d670d0a09bec3b6900421df17fc9d959545ee953.tar.bz2 samba-d670d0a09bec3b6900421df17fc9d959545ee953.zip |
Revert "Remove gencache_[un]lock_entry"
This reverts commit 7a5a575ffe5196caecedc93970a25abfbe6f8059.
(This used to be commit 62e444dd50ae974c2ab9a553cdf7f188a8f2c538)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/gencache.c | 25 |
1 files changed, 25 insertions, 0 deletions
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; +} |