Move code around to fix headers problem etc.

This commit is contained in:
counterpoint
2015-05-27 10:17:35 +01:00
parent 351f52b8e1
commit 6c5e6a5959
4 changed files with 80 additions and 99 deletions

View File

@ -500,6 +500,31 @@ SERVER_PARAM *param;
dcb_printf(dcb, "\tCurrent no. of operations: %d\n", server->stats.n_current_ops);
}
/**
* Diagnostic to print all DCBs in persistent pool for a server
*
* @param pdcb DCB to print results to
* @param server SERVER for which DCBs are to be printed
*/
void
dprintPersistentDCBs(DCB *pdcb, SERVER *server)
{
DCB *dcb;
spinlock_acquire(&server->persistlock);
#if SPINLOCK_PROFILE
dcb_printf(pdcb, "DCB List Spinlock Statistics:\n");
spinlock_stats(&server->persistlock, spin_reporter, pdcb);
#endif
dcb = server->persistent;
while (dcb)
{
dprintOneDCB(pdcb, dcb);
dcb = dcb->nextpersistent;
}
spinlock_release(&server->persistlock);
}
/**
* List all servers in a tabular form to a DCB
*