Ignore:
Timestamp:
Nov 25, 2013, 4:35:16 PM (12 years ago)
Author:
Silvan Scherrer
Message:

Samba 3.6: use fcntl and friends for locking

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/lib/tdb/common/transaction.c

    r745 r834  
    486486        /* get a read lock from the freelist to the end of file. This
    487487           is upgraded to a write lock during the commit */
    488 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough.
    489488        if (tdb_allrecord_lock(tdb, F_RDLCK, TDB_LOCK_WAIT, true) == -1) {
    490489                TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to get hash locks\n"));
    491490                goto fail_allrecord_lock;
    492491        }
    493 #endif
    494492
    495493        /* setup a copy of the hash table heads so the hash scan in
     
    523521
    524522fail:
    525 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough.
    526523        tdb_allrecord_unlock(tdb, F_RDLCK, false);
    527 #endif
    528524fail_allrecord_lock:
    529525        tdb_transaction_unlock(tdb, F_WRLCK);
     
    949945
    950946        /* upgrade the main transaction lock region to a write lock */
    951 #ifndef __OS2__ // YD the global lock is an exclusive lock for us, it is enough
    952947        if (tdb_allrecord_upgrade(tdb) == -1) {
    953948                TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_prepare_commit: failed to upgrade hash locks\n"));
     
    955950                return -1;
    956951        }
    957 #endif
    958952
    959953        /* get the open lock - this prevents new users attaching to the database
Note: See TracChangeset for help on using the changeset viewer.