diff options
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/tdb/config.mk | 1 | ||||
-rw-r--r-- | source4/lib/tdb/include/tdb.h | 2 | ||||
-rw-r--r-- | source4/lib/tdb/include/tdbutil.h | 10 |
3 files changed, 12 insertions, 1 deletions
diff --git a/source4/lib/tdb/config.mk b/source4/lib/tdb/config.mk index 96c2c590cb..2b2a595fca 100644 --- a/source4/lib/tdb/config.mk +++ b/source4/lib/tdb/config.mk @@ -6,6 +6,7 @@ INIT_OBJ_FILES = \ ADD_OBJ_FILES = \ lib/tdb/common/tdbutil.o \ lib/tdb/common/spinlock.o +NOPROTO=YES REQUIRED_SUBSYSTEMS = \ LIBREPLACE # diff --git a/source4/lib/tdb/include/tdb.h b/source4/lib/tdb/include/tdb.h index 416333f0b0..f53503a1d6 100644 --- a/source4/lib/tdb/include/tdb.h +++ b/source4/lib/tdb/include/tdb.h @@ -141,6 +141,8 @@ void tdb_unlockall(TDB_CONTEXT *tdb); void tdb_set_lock_alarm(sig_atomic_t *palarm); int tdb_chainlock(TDB_CONTEXT *tdb, TDB_DATA key); int tdb_chainunlock(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_chainlock_read(TDB_CONTEXT *tdb, TDB_DATA key); +int tdb_chainunlock_read(TDB_CONTEXT *tdb, TDB_DATA key); /* Debug functions. Not used in production. */ void tdb_dump_all(TDB_CONTEXT *tdb); diff --git a/source4/lib/tdb/include/tdbutil.h b/source4/lib/tdb/include/tdbutil.h index 01473446a1..cfa83bd937 100644 --- a/source4/lib/tdb/include/tdbutil.h +++ b/source4/lib/tdb/include/tdbutil.h @@ -32,6 +32,14 @@ typedef struct keys_node TDB_LIST_NODE *tdb_search_keys(TDB_CONTEXT*, const char*); void tdb_search_list_free(TDB_LIST_NODE*); - +int32_t tdb_change_int32_atomic(TDB_CONTEXT *tdb, const char *keystr, int32_t *oldval, int32_t change_val); +int tdb_lock_bystring(TDB_CONTEXT *tdb, const char *keyval, uint_t timeout); +void tdb_unlock_bystring(TDB_CONTEXT *tdb, const char *keyval); +int32_t tdb_fetch_int32(TDB_CONTEXT *tdb, const char *keystr); +int tdb_store_int32(TDB_CONTEXT *tdb, const char *keystr, int32_t v); +int tdb_traverse_delete_fn(TDB_CONTEXT *the_tdb, TDB_DATA key, TDB_DATA dbuf, + void *state); +int tdb_store_bystring(TDB_CONTEXT *tdb, const char *keystr, TDB_DATA data, int flags); +TDB_DATA tdb_fetch_bystring(TDB_CONTEXT *tdb, const char *keystr); #endif /* __TDBUTIL_H__ */ |