Minor tidy up, including removing obsolete MUTEX_BLOCK.
This commit is contained in:
@ -301,17 +301,17 @@ int rval;
|
|||||||
static int
|
static int
|
||||||
process_config_context(CONFIG_CONTEXT *context)
|
process_config_context(CONFIG_CONTEXT *context)
|
||||||
{
|
{
|
||||||
CONFIG_CONTEXT *obj;
|
CONFIG_CONTEXT *obj;
|
||||||
int error_count = 0;
|
int error_count = 0;
|
||||||
HASHTABLE* monitorhash;
|
HASHTABLE* monitorhash;
|
||||||
|
|
||||||
if((monitorhash = hashtable_alloc(5,simple_str_hash,strcmp)) == NULL)
|
if((monitorhash = hashtable_alloc(5,simple_str_hash,strcmp)) == NULL)
|
||||||
{
|
{
|
||||||
skygw_log_write(LOGFILE_ERROR,"Error: Failed to allocate ,onitor configuration check hashtable.");
|
skygw_log_write(LOGFILE_ERROR,"Error: Failed to allocate ,monitor configuration check hashtable.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
hashtable_memory_fns(monitorhash,(HASHMEMORYFN)strdup,NULL,(HASHMEMORYFN)free,NULL);
|
||||||
|
|
||||||
hashtable_memory_fns(monitorhash,(HASHMEMORYFN)strdup,NULL,(HASHMEMORYFN)free,NULL);
|
|
||||||
/**
|
/**
|
||||||
* Process the data and create the services and servers defined
|
* Process the data and create the services and servers defined
|
||||||
* in the data.
|
* in the data.
|
||||||
|
@ -871,16 +871,6 @@ unsigned long qtime;
|
|||||||
eno = gw_getsockerrno(dcb->fd);
|
eno = gw_getsockerrno(dcb->fd);
|
||||||
|
|
||||||
if (eno == 0) {
|
if (eno == 0) {
|
||||||
#if MUTEX_BLOCK
|
|
||||||
simple_mutex_lock(&dcb->dcb_write_lock, true);
|
|
||||||
ss_info_dassert(!dcb->dcb_write_active,
|
|
||||||
"Write already active");
|
|
||||||
dcb->dcb_write_active = TRUE;
|
|
||||||
atomic_add(&pollStats.n_write, 1);
|
|
||||||
dcb->func.write_ready(dcb);
|
|
||||||
dcb->dcb_write_active = FALSE;
|
|
||||||
simple_mutex_unlock(&dcb->dcb_write_lock);
|
|
||||||
#else
|
|
||||||
atomic_add(&pollStats.n_write, 1);
|
atomic_add(&pollStats.n_write, 1);
|
||||||
/** Read session id to thread's local storage */
|
/** Read session id to thread's local storage */
|
||||||
LOGIF_MAYBE(LT, (dcb_get_ses_log_info(
|
LOGIF_MAYBE(LT, (dcb_get_ses_log_info(
|
||||||
@ -888,7 +878,6 @@ unsigned long qtime;
|
|||||||
&tls_log_info.li_sesid,
|
&tls_log_info.li_sesid,
|
||||||
&tls_log_info.li_enabled_logs)));
|
&tls_log_info.li_enabled_logs)));
|
||||||
dcb->func.write_ready(dcb);
|
dcb->func.write_ready(dcb);
|
||||||
#endif
|
|
||||||
} else {
|
} else {
|
||||||
LOGIF(LD, (skygw_log_write(
|
LOGIF(LD, (skygw_log_write(
|
||||||
LOGFILE_DEBUG,
|
LOGFILE_DEBUG,
|
||||||
@ -904,12 +893,6 @@ unsigned long qtime;
|
|||||||
}
|
}
|
||||||
if (ev & EPOLLIN)
|
if (ev & EPOLLIN)
|
||||||
{
|
{
|
||||||
#if MUTEX_BLOCK
|
|
||||||
simple_mutex_lock(&dcb->dcb_read_lock, true);
|
|
||||||
ss_info_dassert(!dcb->dcb_read_active, "Read already active");
|
|
||||||
dcb->dcb_read_active = TRUE;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (dcb->state == DCB_STATE_LISTENING)
|
if (dcb->state == DCB_STATE_LISTENING)
|
||||||
{
|
{
|
||||||
LOGIF(LD, (skygw_log_write(
|
LOGIF(LD, (skygw_log_write(
|
||||||
@ -943,11 +926,6 @@ unsigned long qtime;
|
|||||||
&tls_log_info.li_enabled_logs)));
|
&tls_log_info.li_enabled_logs)));
|
||||||
dcb->func.read(dcb);
|
dcb->func.read(dcb);
|
||||||
}
|
}
|
||||||
#if MUTEX_BLOCK
|
|
||||||
dcb->dcb_read_active = FALSE;
|
|
||||||
simple_mutex_unlock(
|
|
||||||
&dcb->dcb_read_lock);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
if (ev & EPOLLERR)
|
if (ev & EPOLLERR)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user