Added support for delay queue and authlock

This commit is contained in:
Massimiliano Pinto
2013-07-03 18:10:10 +02:00
parent 77c759ac33
commit ad87126c16
2 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,10 @@
* 28/06/13 Mark Riddoch Changed the free mechanism ti * 28/06/13 Mark Riddoch Changed the free mechanism ti
* introduce a zombie state for the * introduce a zombie state for the
* dcb * dcb
* 02/07/2013 Massimiliano Pinto Addition of delayqlock, delayq and authlock
* for handling backend asynchronous protocol connection
* and a generic lock for backend authentication
*
* @endverbatim * @endverbatim
*/ */
#include <stdio.h> #include <stdio.h>
@ -77,7 +81,10 @@ DCB *rval;
return NULL; return NULL;
} }
spinlock_init(&rval->writeqlock); spinlock_init(&rval->writeqlock);
spinlock_init(&rval->delayqlock);
spinlock_init(&rval->authlock);
rval->writeq = NULL; rval->writeq = NULL;
rval->delayq = NULL;
rval->remote = NULL; rval->remote = NULL;
rval->state = DCB_STATE_ALLOC; rval->state = DCB_STATE_ALLOC;
rval->next = NULL; rval->next = NULL;

View File

@ -39,6 +39,9 @@ struct service;
* 11/06/13 Mark Riddoch Updated GWPROTOCOL structure with new * 11/06/13 Mark Riddoch Updated GWPROTOCOL structure with new
* entry points * entry points
* 18/06/13 Mark Riddoch Addition of the listener entry point * 18/06/13 Mark Riddoch Addition of the listener entry point
* 02/06/2013 Massimiliano Pinto Addition of delayqlock, delayq and authlock
* for handling backend asynchronous protocol connection
* and a generic lock for backend authentication
* *
* @endverbatim * @endverbatim
*/ */
@ -134,6 +137,7 @@ typedef struct dcb {
GWBUF *writeq; /**< Write Data Queue */ GWBUF *writeq; /**< Write Data Queue */
SPINLOCK delayqlock; /**< Delay Backend Write Queue spinlock */ SPINLOCK delayqlock; /**< Delay Backend Write Queue spinlock */
GWBUF *delayq; /**< Delay Backend Write Data Queue */ GWBUF *delayq; /**< Delay Backend Write Data Queue */
SPINLOCK authlock; /**< Generic Authorization spinlock */
DCBSTATS stats; /**< DCB related statistics */ DCBSTATS stats; /**< DCB related statistics */