MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / getCleanBuffer

Method getCleanBuffer

src/burp/BurpTasks.cpp:307–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307IOBuffer* BackupRelationTask::getCleanBuffer(Item& item)
308{
309 IOBuffer* buf = NULL;
310 {
311 MutexLockGuard guard(item.m_mutex, FB_FUNCTION);
312
313 while (!m_stop && !item.m_cleanBuffers.hasData())
314 item.m_cleanCond.wait(item.m_mutex);
315
316 if (m_stop)
317 return NULL;
318
319 fb_assert(item.m_cleanBuffers.hasData());
320
321 if (item.m_cleanBuffers.hasData())
322 buf = item.m_cleanBuffers.pop();
323 }
324
325 fb_assert(buf);
326 if (buf)
327 buf->lock();
328
329 return buf;
330}
331
332void BackupRelationTask::putDirtyBuffer(IOBuffer* buf)
333{

Callers 1

renewBufferMethod · 0.80

Calls 5

hasDataMethod · 0.45
waitMethod · 0.45
popMethod · 0.45
lockMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected