mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-16 20:15:49 +00:00
MINOR: channel: Remove CF_WRITE_ACTIVITY
Thanks to previous changes, CF_WRITE_ACTIVITY flags can be removed. Everywhere it was used, its value is now directly used (CF_WRITE_EVENT|CF_WRITE_ERROR).
This commit is contained in:
parent
33e03cec5f
commit
a63f8f379f
@ -67,7 +67,6 @@
|
||||
/* unused: 0x00000200 */
|
||||
#define CF_WRITE_TIMEOUT 0x00000400 /* timeout while waiting for consumer */
|
||||
#define CF_WRITE_ERROR 0x00000800 /* unrecoverable error on consumer side */
|
||||
#define CF_WRITE_ACTIVITY (CF_WRITE_EVENT|CF_WRITE_ERROR)
|
||||
|
||||
#define CF_WAKE_WRITE 0x00001000 /* wake the task up when there's write activity */
|
||||
#define CF_SHUTW 0x00002000 /* consumer has already shut down */
|
||||
@ -122,7 +121,7 @@
|
||||
#define CF_ISRESP 0x80000000 /* 0 = request channel, 1 = response channel */
|
||||
|
||||
/* Masks which define input events for stream analysers */
|
||||
#define CF_MASK_ANALYSER (CF_READ_ATTACHED|CF_READ_EVENT|CF_READ_ERROR|CF_READ_TIMEOUT|CF_ANA_TIMEOUT|CF_WRITE_ACTIVITY|CF_WAKE_ONCE)
|
||||
#define CF_MASK_ANALYSER (CF_READ_ATTACHED|CF_READ_EVENT|CF_READ_ERROR|CF_READ_TIMEOUT|CF_ANA_TIMEOUT|CF_WRITE_EVENT|CF_WRITE_ERROR|CF_WAKE_ONCE)
|
||||
|
||||
/* Mask for static flags which cause analysers to be woken up when they change */
|
||||
#define CF_MASK_STATIC (CF_SHUTR|CF_SHUTW|CF_SHUTR_NOW|CF_SHUTW_NOW)
|
||||
|
@ -534,7 +534,7 @@ static inline void channel_check_timeouts(struct channel *chn)
|
||||
unlikely(tick_is_expired(chn->rex, now_ms)))
|
||||
chn->flags |= CF_READ_TIMEOUT;
|
||||
|
||||
if (likely(!(chn->flags & (CF_SHUTW|CF_WRITE_TIMEOUT|CF_WRITE_ACTIVITY))) &&
|
||||
if (likely(!(chn->flags & (CF_SHUTW|CF_WRITE_TIMEOUT|CF_WRITE_EVENT|CF_WRITE_ERROR))) &&
|
||||
unlikely(tick_is_expired(chn->wex, now_ms)))
|
||||
chn->flags |= CF_WRITE_TIMEOUT;
|
||||
|
||||
|
@ -826,7 +826,7 @@ static void sc_app_chk_snd_conn(struct stconn *sc)
|
||||
oc->wex = tick_add_ifset(now_ms, oc->wto);
|
||||
}
|
||||
|
||||
if (likely(oc->flags & CF_WRITE_ACTIVITY)) {
|
||||
if (likely(oc->flags & (CF_WRITE_EVENT|CF_WRITE_ERROR))) {
|
||||
struct channel *ic = sc_ic(sc);
|
||||
|
||||
/* update timeout if we have written something */
|
||||
@ -1126,7 +1126,7 @@ static void sc_notify(struct stconn *sc)
|
||||
sc_ep_clr(sc, SE_FL_WAIT_DATA);
|
||||
|
||||
/* update OC timeouts and wake the other side up if it's waiting for room */
|
||||
if (oc->flags & CF_WRITE_ACTIVITY) {
|
||||
if (oc->flags & (CF_WRITE_EVENT|CF_WRITE_ERROR)) {
|
||||
if ((oc->flags & (CF_SHUTW|CF_WRITE_EVENT)) == CF_WRITE_EVENT &&
|
||||
!channel_is_empty(oc))
|
||||
if (tick_isset(oc->wex))
|
||||
|
@ -1783,7 +1783,7 @@ struct task *process_stream(struct task *t, void *context, unsigned int state)
|
||||
*/
|
||||
if (!((req->flags | res->flags) &
|
||||
(CF_SHUTR|CF_READ_EVENT|CF_READ_ERROR|CF_READ_TIMEOUT|CF_SHUTW|
|
||||
CF_WRITE_ACTIVITY|CF_WRITE_TIMEOUT|CF_ANA_TIMEOUT)) &&
|
||||
CF_WRITE_EVENT|CF_WRITE_ERROR|CF_WRITE_TIMEOUT|CF_ANA_TIMEOUT)) &&
|
||||
!(s->flags & SF_CONN_EXP) &&
|
||||
!((sc_ep_get(scf) | scb->flags) & SE_FL_ERROR) &&
|
||||
((s->pending_events & TASK_WOKEN_ANY) == TASK_WOKEN_TIMER)) {
|
||||
|
Loading…
Reference in New Issue
Block a user