Shutdown fix in housekeeper

In memory logging in blr_master
This commit is contained in:
Mark Riddoch
2014-09-26 12:36:59 +01:00
parent 06596a0bc3
commit 3430fc99d2
7 changed files with 100 additions and 16 deletions

View File

@ -391,7 +391,7 @@ DCB *zombies = NULL;
while (1)
{
/* Process of the queue of waiting requests */
while (process_pollq(thread_id))
while (do_shutdown == 0 && process_pollq(thread_id))
{
if (thread_data)
thread_data[thread_id].state = THREAD_ZPROCESSING;
@ -885,6 +885,20 @@ poll_bitmask()
return &poll_mask;
}
/**
* Display an entry from the spinlock statistics data
*
* @param dcb The DCB to print to
* @param desc Description of the statistic
* @param value The statistic value
*/
static void
spin_reporter(void *dcb, char *desc, int value)
{
dcb_printf((DCB *)dcb, "\t%-40s %d\n", desc, value);
}
/**
* Debug routine to print the polling statistics
*
@ -922,6 +936,11 @@ int i;
}
dcb_printf(dcb, "\t>= %d\t\t\t%d\n", MAXNFDS,
pollStats.n_fds[MAXNFDS-1]);
#if SPINLOCK_PROFILE
dcb_printf(dcb, "Event queue lock statistics:\n");
spinlock_stats(&pollqlock, spin_reporter, dcb);
#endif
}
/**