Changeset 456 for trunk/server/lib/tdb/common/transaction.c
- Timestamp:
- Jun 7, 2010, 9:08:40 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/lib/tdb/common/transaction.c
r414 r456 495 495 /* get a read lock from the freelist to the end of file. This 496 496 is upgraded to a write lock during the commit */ 497 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough. 497 498 if (tdb_brlock(tdb, FREELIST_TOP, F_RDLCK, F_SETLKW, 0, 0) == -1) { 498 499 TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_start: failed to get hash locks\n")); … … 500 501 goto fail; 501 502 } 503 #endif 502 504 503 505 /* setup a copy of the hash table heads so the hash scan in … … 531 533 532 534 fail: 535 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough. 533 536 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0); 537 #endif 534 538 tdb_transaction_unlock(tdb); 535 539 SAFE_FREE(tdb->transaction->blocks); … … 632 636 tdb->methods = tdb->transaction->io_methods; 633 637 638 #ifndef __OS2__ // YD the transation lock is an exclusive lock for us, it is enough 634 639 tdb_brlock(tdb, FREELIST_TOP, F_UNLCK, F_SETLKW, 0, 0); 640 #endif 635 641 tdb_transaction_unlock(tdb); 636 642 SAFE_FREE(tdb->transaction->hash_heads); … … 940 946 941 947 /* upgrade the main transaction lock region to a write lock */ 948 #ifndef __OS2__ // YD the global lock is an exclusive lock for us, it is enough 942 949 if (tdb_brlock_upgrade(tdb, FREELIST_TOP, 0) == -1) { 943 950 TDB_LOG((tdb, TDB_DEBUG_ERROR, "tdb_transaction_prepare_commit: failed to upgrade hash locks\n")); … … 946 953 return -1; 947 954 } 955 #endif 948 956 949 957 /* get the global lock - this prevents new users attaching to the database
Note:
See TracChangeset
for help on using the changeset viewer.