| 5182 | |
| 5183 | |
| 5184 | bool BufferDesc::addRef(thread_db* tdbb, SyncType syncType, int wait) |
| 5185 | { |
| 5186 | if (wait == 1) |
| 5187 | bdb_syncPage.lock(NULL, syncType, FB_FUNCTION); |
| 5188 | else if (!bdb_syncPage.lock(NULL, syncType, FB_FUNCTION, -wait * 1000)) |
| 5189 | return false; |
| 5190 | |
| 5191 | ++bdb_use_count; |
| 5192 | |
| 5193 | if (syncType == SYNC_EXCLUSIVE) |
| 5194 | { |
| 5195 | bdb_exclusive = tdbb; |
| 5196 | ++bdb_writers; |
| 5197 | } |
| 5198 | |
| 5199 | tdbb->registerBdb(this); |
| 5200 | return true; |
| 5201 | } |
| 5202 | |
| 5203 | |
| 5204 | bool BufferDesc::addRefConditional(thread_db* tdbb, SyncType syncType) |
no test coverage detected