Fixed memory leak on queue nodes by using local memory heap on normal

execution and global memory heap on shutdown.

Added a funcition to get work items from queue without waiting and
additional info when there is no work to do for a extended periods.
This commit is contained in:
Jan Lindström 2014-02-25 13:15:55 +02:00
commit 24235e99d8
8 changed files with 248 additions and 221 deletions

View file

@ -95,6 +95,15 @@ ib_wqueue_timedwait(
ib_wqueue_t* wq, /* in: work queue */
ib_time_t wait_in_usecs); /* in: wait time in micro seconds */
/********************************************************************
Return first item on work queue or NULL if queue is empty
@return work item or NULL */
void*
ib_wqueue_nowait(
/*=============*/
ib_wqueue_t* wq); /*<! in: work queue */
/* Work queue. */
struct ib_wqueue_t {
ib_mutex_t mutex; /*!< mutex protecting everything */