| 5241 | |
| 5242 | |
| 5243 | void BufferDesc::release(thread_db* tdbb, bool repost) |
| 5244 | { |
| 5245 | //const SyncType oldState = bdb_syncPage.getState(); Unfinished logic here??? |
| 5246 | |
| 5247 | fb_assert(!(bdb_flags & BDB_marked) || bdb_writers > 1); |
| 5248 | |
| 5249 | if (!tdbb->clearBdb(this)) |
| 5250 | return; |
| 5251 | |
| 5252 | --bdb_use_count; |
| 5253 | |
| 5254 | if (bdb_writers) |
| 5255 | { |
| 5256 | if (--bdb_writers == 0) |
| 5257 | bdb_exclusive = NULL; |
| 5258 | |
| 5259 | bdb_syncPage.unlock(NULL, SYNC_EXCLUSIVE); |
| 5260 | } |
| 5261 | else |
| 5262 | bdb_syncPage.unlock(NULL, SYNC_SHARED); |
| 5263 | |
| 5264 | if (repost && !isLocked() && (bdb_ast_flags & BDB_blocking)) |
| 5265 | { |
| 5266 | PAGE_LOCK_RE_POST(tdbb, bdb_bcb, bdb_lock); |
| 5267 | } |
| 5268 | } |
| 5269 | |
| 5270 | |
| 5271 | void BufferDesc::lockIO(thread_db* tdbb) |
no test coverage detected