Changeset 830
- Timestamp:
- Nov 13, 2013, 4:36:13 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/lib/tdb/common/lock.c
r828 r830 258 258 #ifdef __OS2__ 259 259 int rc = 0; 260 if (off == FREELIST_TOP && len == 0) { //unlock complete tdb file 260 rc = fcntl_lock(tdb, F_UNLCK, off, len, 1); 261 // if the first unlock doesn't work and it's a complete unlock, 262 // we split it in 2 parts. first hash size*4 and then the rest 263 // as it was locked that way as well. and it seems fcntl() doesn't care 264 if (rc != 0 && off == FREELIST_TOP && len == 0) { 261 265 rc = fcntl_lock(tdb, F_UNLCK, off, tdb->header.hash_size *4, 1); 262 266 if (rc == 0) 263 267 rc = fcntl_lock(tdb, F_UNLCK, (off + tdb->header.hash_size *4), len, 1); 264 } else {265 rc = fcntl_lock(tdb, F_UNLCK, off, len, 1);266 268 } 267 269 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.