s3: piddir creation fix part 2.
[ira/wip.git] / lib / tdb / common / traverse.c
index baaf58ae87dabc3d0048ca1c95f04ac0780ac298..517fecb4fc8d6c1fcb50b3fec42b3ab9fa5d3358 100644 (file)
@@ -212,7 +212,7 @@ out:
 /*
   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 };
@@ -220,7 +220,7 @@ int tdb_traverse_read(struct tdb_context *tdb,
 
        /* 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;
        }
 
@@ -241,7 +241,7 @@ int tdb_traverse_read(struct tdb_context *tdb,
   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 };
@@ -251,7 +251,7 @@ int tdb_traverse(struct tdb_context *tdb,
                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;
        }
 
@@ -267,7 +267,7 @@ int tdb_traverse(struct tdb_context *tdb,
 
 
 /* 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;
@@ -298,7 +298,7 @@ TDB_DATA tdb_firstkey(struct tdb_context *tdb)
 }
 
 /* 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;