Removed dcb->mutex since it didn't solve any problem.

This commit is contained in:
vraatikka
2013-08-19 13:01:07 +03:00
parent a5dd900acb
commit 24367fb400
3 changed files with 0 additions and 9 deletions

View File

@ -95,7 +95,6 @@ DCB *rval;
rval->data = NULL; rval->data = NULL;
rval->protocol = NULL; rval->protocol = NULL;
rval->session = NULL; rval->session = NULL;
simple_mutex_init(&rval->mutex, "dcb mutex");
memset(&rval->stats, 0, sizeof(DCBSTATS)); // Zero the statistics memset(&rval->stats, 0, sizeof(DCBSTATS)); // Zero the statistics
bitmask_init(&rval->memdata.bitmask); bitmask_init(&rval->memdata.bitmask);
rval->memdata.next = NULL; rval->memdata.next = NULL;

View File

@ -195,9 +195,6 @@ bool no_op = FALSE;
{ {
DCB *dcb = (DCB *)events[i].data.ptr; DCB *dcb = (DCB *)events[i].data.ptr;
__uint32_t ev = events[i].events; __uint32_t ev = events[i].events;
simple_mutex_t* mutex = &dcb->mutex;
simple_mutex_lock(mutex, TRUE);
skygw_log_write( skygw_log_write(
LOGFILE_TRACE, LOGFILE_TRACE,
@ -210,7 +207,6 @@ bool no_op = FALSE;
LOGFILE_TRACE, LOGFILE_TRACE,
"%lu [poll_waitevents] dcb is zombie", "%lu [poll_waitevents] dcb is zombie",
pthread_self()); pthread_self());
simple_mutex_unlock(mutex);
continue; continue;
} }
@ -219,7 +215,6 @@ bool no_op = FALSE;
atomic_add(&pollStats.n_error, 1); atomic_add(&pollStats.n_error, 1);
dcb->func.error(dcb); dcb->func.error(dcb);
if (DCB_ISZOMBIE(dcb)) { if (DCB_ISZOMBIE(dcb)) {
simple_mutex_unlock(mutex);
continue; continue;
} }
} }
@ -228,7 +223,6 @@ bool no_op = FALSE;
atomic_add(&pollStats.n_hup, 1); atomic_add(&pollStats.n_hup, 1);
dcb->func.hangup(dcb); dcb->func.hangup(dcb);
if (DCB_ISZOMBIE(dcb)) { if (DCB_ISZOMBIE(dcb)) {
simple_mutex_unlock(mutex);
continue; continue;
} }
} }
@ -267,7 +261,6 @@ bool no_op = FALSE;
dcb->func.read(dcb); dcb->func.read(dcb);
} }
} }
simple_mutex_unlock(mutex);
} /**< for */ } /**< for */
no_op = FALSE; no_op = FALSE;
} }

View File

@ -134,7 +134,6 @@ typedef struct {
* gateway may be selected to execute the required actions when a network event occurs. * gateway may be selected to execute the required actions when a network event occurs.
*/ */
typedef struct dcb { typedef struct dcb {
simple_mutex_t mutex; /**< Protects dcb processing. Coarse and temporary? */
int fd; /**< The descriptor */ int fd; /**< The descriptor */
int state; /**< Current descriptor state */ int state; /**< Current descriptor state */
char *remote; /**< Address of remote end */ char *remote; /**< Address of remote end */