change field lc_pair to lcp
parent
2272bf2707
commit
c5d64a0d54
|
|
@ -135,7 +135,7 @@ static int idempotency_channel_alloc_init(void *element, void *args)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((result=init_pthread_lock_cond_pair(&channel->lc_pair)) != 0) {
|
if ((result=init_pthread_lock_cond_pair(&channel->lcp)) != 0) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,7 @@ static inline int idempotency_client_channel_check_wait_ex(
|
||||||
}
|
}
|
||||||
|
|
||||||
idempotency_client_channel_check_reconnect(channel);
|
idempotency_client_channel_check_reconnect(channel);
|
||||||
lcp_timedwait_sec(&channel->lc_pair, timeout);
|
lcp_timedwait_sec(&channel->lcp, timeout);
|
||||||
if (__sync_add_and_fetch(&channel->established, 0)) {
|
if (__sync_add_and_fetch(&channel->established, 0)) {
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ typedef struct idempotency_client_channel {
|
||||||
time_t last_connect_time; //for connect frequency control
|
time_t last_connect_time; //for connect frequency control
|
||||||
time_t last_pkg_time; //last communication time
|
time_t last_pkg_time; //last communication time
|
||||||
time_t last_report_time; //last report time for rpc receipt
|
time_t last_report_time; //last report time for rpc receipt
|
||||||
pthread_lock_cond_pair_t lc_pair; //for channel valid check and notify
|
pthread_lock_cond_pair_t lcp; //for channel valid check and notify
|
||||||
struct fast_mblock_man receipt_allocator;
|
struct fast_mblock_man receipt_allocator;
|
||||||
struct fast_task_info *task;
|
struct fast_task_info *task;
|
||||||
struct fc_queue queue;
|
struct fc_queue queue;
|
||||||
|
|
|
||||||
|
|
@ -284,9 +284,9 @@ static int deal_setup_channel_response(struct fast_task_info *task)
|
||||||
}
|
}
|
||||||
channel->buffer_size = FC_MIN(buffer_size, task->size);
|
channel->buffer_size = FC_MIN(buffer_size, task->size);
|
||||||
|
|
||||||
PTHREAD_MUTEX_LOCK(&channel->lc_pair.lock);
|
PTHREAD_MUTEX_LOCK(&channel->lcp.lock);
|
||||||
pthread_cond_broadcast(&channel->lc_pair.cond);
|
pthread_cond_broadcast(&channel->lcp.cond);
|
||||||
PTHREAD_MUTEX_UNLOCK(&channel->lc_pair.lock);
|
PTHREAD_MUTEX_UNLOCK(&channel->lcp.lock);
|
||||||
|
|
||||||
if (channel->waiting_resp_qinfo.head != NULL) {
|
if (channel->waiting_resp_qinfo.head != NULL) {
|
||||||
bool notify;
|
bool notify;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue