MINOR: buffer: use MT_LIST_ADDQ() for buffer_wait lists additions
The TRY_ADDQ there was not needed since the wait list is exclusively
owned by the caller. There's a preliminary test on MT_LIST_ADDED()
that might have been eliminated by keeping MT_LIST_TRY_ADDQ() but
it would have required two more expensive writes before testing so
better keep the test the way it is.
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index b6359c6..62e535e 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -2807,7 +2807,7 @@
if (b_alloc_margin(buf, global.tune.reserved_bufs))
return 1;
- MT_LIST_TRY_ADDQ(&buffer_wq, &buffer_wait->list);
+ MT_LIST_ADDQ(&buffer_wq, &buffer_wait->list);
return 0;
}
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index 05723e8..7165e39 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -605,7 +605,7 @@
unlikely((buf = b_alloc_margin(bptr, 0)) == NULL)) {
fconn->buf_wait.target = fconn;
fconn->buf_wait.wakeup_cb = fcgi_buf_available;
- MT_LIST_TRY_ADDQ(&buffer_wq, &fconn->buf_wait.list);
+ MT_LIST_ADDQ(&buffer_wq, &fconn->buf_wait.list);
}
return buf;
}
diff --git a/src/mux_h1.c b/src/mux_h1.c
index 0626a7d..ae3bca3 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -416,7 +416,7 @@
unlikely((buf = b_alloc_margin(bptr, 0)) == NULL)) {
h1c->buf_wait.target = h1c;
h1c->buf_wait.wakeup_cb = h1_buf_available;
- MT_LIST_TRY_ADDQ(&buffer_wq, &h1c->buf_wait.list);
+ MT_LIST_ADDQ(&buffer_wq, &h1c->buf_wait.list);
}
return buf;
}
diff --git a/src/mux_h2.c b/src/mux_h2.c
index ce26c92..d02a04d 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -683,7 +683,7 @@
unlikely((buf = b_alloc_margin(bptr, 0)) == NULL)) {
h2c->buf_wait.target = h2c;
h2c->buf_wait.wakeup_cb = h2_buf_available;
- MT_LIST_TRY_ADDQ(&buffer_wq, &h2c->buf_wait.list);
+ MT_LIST_ADDQ(&buffer_wq, &h2c->buf_wait.list);
}
return buf;
}
diff --git a/src/stream.c b/src/stream.c
index f3253c6..287f406 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -728,7 +728,7 @@
if (b_alloc_margin(&s->res.buf, 0))
return 1;
- MT_LIST_TRY_ADDQ(&buffer_wq, &s->buffer_wait.list);
+ MT_LIST_ADDQ(&buffer_wq, &s->buffer_wait.list);
return 0;
}