}
/* The applet indicates that it's ready to consume data from the stream's
- * output buffer.
+ * output buffer. Rely on the corresponding SE function
*/
static inline void applet_will_consume(struct appctx *appctx)
{
- se_fl_clr(appctx->sedesc, SE_FL_WONT_CONSUME);
+ se_will_consume(appctx->sedesc);
}
/* The applet indicates that it's not willing to consume data from the stream's
- * output buffer.
+ * output buffer. Rely on the corresponding SE function
*/
static inline void applet_wont_consume(struct appctx *appctx)
{
- se_fl_set(appctx->sedesc, SE_FL_WONT_CONSUME);
+ se_wont_consume(appctx->sedesc);
}
/* The applet indicates that it's willing to consume data from the stream's
* output buffer, but that there's not enough, so it doesn't want to be woken
- * up until more are presented.
+ * up until more are presented. Rely on the corresponding SE function
*/
static inline void applet_need_more_data(struct appctx *appctx)
{
- se_fl_clr(appctx->sedesc, SE_FL_WONT_CONSUME);
- se_fl_set(appctx->sedesc, SE_FL_WAIT_DATA);
+ se_need_more_data(appctx->sedesc);
}
/* The applet indicates that it does not expect data from the opposite endpoint.
}
/* The stream endpoint indicates that it's ready to consume data from the
- * stream's output buffer.
+ * stream's output buffer. Report a send activity if the SE is unblocked.
*/
static inline void se_will_consume(struct sedesc *se)
{
- se_fl_clr(se, SE_FL_WONT_CONSUME);
+ if (se_fl_test(se, SE_FL_WONT_CONSUME)) {
+ se_fl_clr(se, SE_FL_WONT_CONSUME);
+ sc_ep_report_send_activity(se->sc);
+ }
}
/* The stream endpoint indicates that it's not willing to consume data from the
*/
static inline void se_need_more_data(struct sedesc *se)
{
- se_fl_clr(se, SE_FL_WONT_CONSUME);
+ se_will_consume(se);
se_fl_set(se, SE_FL_WAIT_DATA);
}