From 24367fb4002b0bcb8006b6994b0795c915475a67 Mon Sep 17 00:00:00 2001 From: vraatikka Date: Mon, 19 Aug 2013 13:01:07 +0300 Subject: [PATCH] Removed dcb->mutex since it didn't solve any problem. --- server/core/dcb.c | 1 - server/core/poll.c | 7 ------- server/include/dcb.h | 1 - 3 files changed, 9 deletions(-) diff --git a/server/core/dcb.c b/server/core/dcb.c index 73d7948ce..5e6912ce3 100644 --- a/server/core/dcb.c +++ b/server/core/dcb.c @@ -95,7 +95,6 @@ DCB *rval; rval->data = NULL; rval->protocol = NULL; rval->session = NULL; - simple_mutex_init(&rval->mutex, "dcb mutex"); memset(&rval->stats, 0, sizeof(DCBSTATS)); // Zero the statistics bitmask_init(&rval->memdata.bitmask); rval->memdata.next = NULL; diff --git a/server/core/poll.c b/server/core/poll.c index 353da62a8..839c32f86 100644 --- a/server/core/poll.c +++ b/server/core/poll.c @@ -195,9 +195,6 @@ bool no_op = FALSE; { DCB *dcb = (DCB *)events[i].data.ptr; __uint32_t ev = events[i].events; - simple_mutex_t* mutex = &dcb->mutex; - - simple_mutex_lock(mutex, TRUE); skygw_log_write( LOGFILE_TRACE, @@ -210,7 +207,6 @@ bool no_op = FALSE; LOGFILE_TRACE, "%lu [poll_waitevents] dcb is zombie", pthread_self()); - simple_mutex_unlock(mutex); continue; } @@ -219,7 +215,6 @@ bool no_op = FALSE; atomic_add(&pollStats.n_error, 1); dcb->func.error(dcb); if (DCB_ISZOMBIE(dcb)) { - simple_mutex_unlock(mutex); continue; } } @@ -228,7 +223,6 @@ bool no_op = FALSE; atomic_add(&pollStats.n_hup, 1); dcb->func.hangup(dcb); if (DCB_ISZOMBIE(dcb)) { - simple_mutex_unlock(mutex); continue; } } @@ -267,7 +261,6 @@ bool no_op = FALSE; dcb->func.read(dcb); } } - simple_mutex_unlock(mutex); } /**< for */ no_op = FALSE; } diff --git a/server/include/dcb.h b/server/include/dcb.h index 332bfbf4b..f55fdb9d0 100644 --- a/server/include/dcb.h +++ b/server/include/dcb.h @@ -134,7 +134,6 @@ typedef struct { * gateway may be selected to execute the required actions when a network event occurs. */ typedef struct dcb { - simple_mutex_t mutex; /**< Protects dcb processing. Coarse and temporary? */ int fd; /**< The descriptor */ int state; /**< Current descriptor state */ char *remote; /**< Address of remote end */