Changeset 41
- Timestamp:
- Jun 18, 2007, 3:08:20 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/samba/source/tdb/common/lock.c
r10 r41 185 185 break; 186 186 case F_RDLCK: 187 fAccess = 1; /* read-only */ 187 188 case F_WRLCK: 188 189 fLock = 1; … … 296 297 int tdb_brlock_upgrade(struct tdb_context *tdb, tdb_off_t offset, size_t len) 297 298 { 298 #ifdef __OS2__299 // YD we use exclusive locks, no need to upgrade.300 return 0;301 #else302 299 int count = 1000; 303 300 while (count--) { 304 301 struct timeval tv; 302 #ifdef __OS2__ 303 // YD we cannot upgrade without an unlock first... 304 tdb_brlock(tdb, offset, F_UNLCK, F_SETLKW, 1, len); 305 #endif 305 306 if (tdb_brlock(tdb, offset, F_WRLCK, F_SETLKW, 1, len) == 0) { 306 307 return 0; … … 318 319 TDB_LOG((tdb, TDB_DEBUG_TRACE,"tdb_brlock_upgrade failed at offset %d\n", offset)); 319 320 return -1; 320 #endif321 321 } 322 322
Note:
See TracChangeset
for help on using the changeset viewer.