comparison libfdcore/fdcore-internal.h @ 1240:0420ccc4671a

Add a counter for the sent requests for which we did not wait for an answer. It might be relevant this value contributes to the load estimate of the remote peer, but it is not very reliable
author Sebastien Decugis <sdecugis@freediameter.net>
date Thu, 10 Oct 2013 16:30:55 +0200
parents 8f9684264fe0
children 239ba25870d8
comparison
equal deleted inserted replaced
1239:b059b9e8ef83 1240:0420ccc4671a
127 /* Sentinel for the sent requests list */ 127 /* Sentinel for the sent requests list */
128 struct sr_list { 128 struct sr_list {
129 struct fd_list srs; /* requests ordered by hop-by-hop id */ 129 struct fd_list srs; /* requests ordered by hop-by-hop id */
130 struct fd_list exp; /* requests that have a timeout set, ordered by timeout */ 130 struct fd_list exp; /* requests that have a timeout set, ordered by timeout */
131 long cnt; /* number of requests in the srs list */ 131 long cnt; /* number of requests in the srs list */
132 long cnt_lost; /* number of requests that have not been answered in time.
133 It is decremented when an unexpected answer is received, so this may not be accurate. */
132 pthread_mutex_t mtx; /* mutex to protect these lists */ 134 pthread_mutex_t mtx; /* mutex to protect these lists */
133 pthread_cond_t cnd; /* cond var used by the thread that handles timeouts */ 135 pthread_cond_t cnd; /* cond var used by the thread that handles timeouts */
134 pthread_t thr; /* the thread that handles timeouts (expirecb called in separate forked threads) */ 136 pthread_t thr; /* the thread that handles timeouts (expirecb called in separate forked threads) */
135 }; 137 };
136 138
"Welcome to our mercurial repository"