projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
fix whitespace.
[m6w6/libmemcached]
/
clients
/
ms_thread.c
diff --git
a/clients/ms_thread.c
b/clients/ms_thread.c
index af856366c345ddea87ddbc9f2fd0a7693155d92c..92d68871fd70c7d327957946023dd902ad39bffd 100644
(file)
--- a/
clients/ms_thread.c
+++ b/
clients/ms_thread.c
@@
-61,7
+61,7
@@
static void ms_check_sock_timeout(void)
if (c->udp)
{
if (c->udp)
{
- time_diff= (int)(ms_thread->curr_time - c->start_time.tv_sec);
+ time_diff= (int)(ms_thread->curr_time -
(rel_time_t)
c->start_time.tv_sec);
/* wait time out */
if (time_diff > SOCK_WAIT_TIMEOUT)
/* wait time out */
if (time_diff > SOCK_WAIT_TIMEOUT)
@@
-69,10
+69,10
@@
static void ms_check_sock_timeout(void)
/* calculate dropped packets count */
if (c->recvpkt > 0)
{
/* calculate dropped packets count */
if (c->recvpkt > 0)
{
- atomic_add_
64
(&ms_stats.pkt_drop, c->packets - c->recvpkt);
+ atomic_add_
size
(&ms_stats.pkt_drop, c->packets - c->recvpkt);
}
}
- atomic_add_
64
(&ms_stats.udp_timeout, 1);
+ atomic_add_
size
(&ms_stats.udp_timeout, 1);
ms_reset_conn(c, true);
}
}
ms_reset_conn(c, true);
}
}
@@
-169,7
+169,7
@@
static int ms_set_thread_cpu_affinity(int cpu)
*/
static int ms_setup_thread(ms_thread_ctx_t *thread_ctx)
{
*/
static int ms_setup_thread(ms_thread_ctx_t *thread_ctx)
{
-
+
ms_thread_t *ms_thread= (ms_thread_t *)calloc(sizeof(*ms_thread), 1);
pthread_setspecific(ms_thread_key, (void *)ms_thread);
ms_thread_t *ms_thread= (ms_thread_t *)calloc(sizeof(*ms_thread), 1);
pthread_setspecific(ms_thread_key, (void *)ms_thread);