Changeset 61 for trunk/samba/source/tdb/common/transaction.c
- Timestamp:
- Aug 20, 2007, 10:37:46 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/tdb/common/transaction.c
r30 r61 436 436 /* get a read lock from the freelist to the end of file. This 437 437 is upgraded to a write lock during the commit */ 438 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough. 438 439 if (tdb_brlock(tdb, FREELIST_TOP, F_RDLCK, F_SETLKW, 0, 0) == -1) { 439 440 TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to get hash locks\n")); … … 441 442 goto fail; 442 443 } 444 #endif 443 445 444 446 /* setup a copy of the hash table heads so the hash scan in … … 479 481 480 482 fail: 483 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough. 481 484 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0); 485 #endif 482 486 tdb_brlock(tdb, TRANSACTION_LOCK, F_UNLCK, F_SETLKW, 0, 1); 483 487 SAFE_FREE(tdb->transaction->hash_heads); … … 534 538 tdb->methods = tdb->transaction->io_methods; 535 539 540 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough. 536 541 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0); 542 #endif 537 543 tdb_brlock(tdb, TRANSACTION_LOCK, F_UNLCK, F_SETLKW, 0, 1); 538 544 SAFE_FREE(tdb->transaction->hash_heads); … … 822 828 823 829 /* upgrade the main transaction lock region to a write lock */ 830 #ifndef __OS2__ // YD the global lock is an exclusive lock for us, it is enough. 824 831 if (tdb_brlock_upgrade(tdb, FREELIST_TOP, 0) == -1) { 825 832 TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to upgrade hash locks\n")); … … 828 835 return -1; 829 836 } 837 #endif 830 838 831 839 /* get the global lock - this prevents new users attaching to the database
Note:
See TracChangeset
for help on using the changeset viewer.