/*
a write style traverse - temporarily marks the db read only
*/
-int tdb_traverse_read(struct tdb_context *tdb,
+_PUBLIC_ int tdb_traverse_read(struct tdb_context *tdb,
tdb_traverse_func fn, void *private_data)
{
struct tdb_traverse_lock tl = { NULL, 0, 0, F_RDLCK };
/* we need to get a read lock on the transaction lock here to
cope with the lock ordering semantics of solaris10 */
- if (tdb_transaction_lock(tdb, F_RDLCK)) {
+ if (tdb_transaction_lock(tdb, F_RDLCK, TDB_LOCK_WAIT)) {
return -1;
}
WARNING: The data buffer given to the callback fn does NOT meet the
alignment restrictions malloc gives you.
*/
-int tdb_traverse(struct tdb_context *tdb,
+_PUBLIC_ int tdb_traverse(struct tdb_context *tdb,
tdb_traverse_func fn, void *private_data)
{
struct tdb_traverse_lock tl = { NULL, 0, 0, F_WRLCK };
return tdb_traverse_read(tdb, fn, private_data);
}
- if (tdb_transaction_lock(tdb, F_WRLCK)) {
+ if (tdb_transaction_lock(tdb, F_WRLCK, TDB_LOCK_WAIT)) {
return -1;
}
/* find the first entry in the database and return its key */
-TDB_DATA tdb_firstkey(struct tdb_context *tdb)
+_PUBLIC_ TDB_DATA tdb_firstkey(struct tdb_context *tdb)
{
TDB_DATA key;
struct tdb_record rec;
}
/* find the next entry in the database, returning its key */
-TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA oldkey)
+_PUBLIC_ TDB_DATA tdb_nextkey(struct tdb_context *tdb, TDB_DATA oldkey)
{
uint32_t oldhash;
TDB_DATA key = tdb_null;