CLEANUP: connections: rename the toremove_lock to takeover_lock
This lock was misnamed and a bit confusing. It's only used for takeover
so let's call it takeover_lock.
diff --git a/src/mux_h1.c b/src/mux_h1.c
index ace04cb..a294c65 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -2219,13 +2219,13 @@
int ret = 0;
- HA_SPIN_LOCK(OTHER_LOCK, &idle_conns[tid].toremove_lock);
+ HA_SPIN_LOCK(OTHER_LOCK, &idle_conns[tid].takeover_lock);
if (tl->context == NULL) {
/* The connection has been taken over by another thread,
* we're no longer responsible for it, so just free the
* tasklet, and do nothing.
*/
- HA_SPIN_UNLOCK(OTHER_LOCK, &idle_conns[tid].toremove_lock);
+ HA_SPIN_UNLOCK(OTHER_LOCK, &idle_conns[tid].takeover_lock);
tasklet_free(tl);
return NULL;
}
@@ -2241,7 +2241,7 @@
if (conn_in_list)
MT_LIST_DEL(&conn->list);
- HA_SPIN_UNLOCK(OTHER_LOCK, &idle_conns[tid].toremove_lock);
+ HA_SPIN_UNLOCK(OTHER_LOCK, &idle_conns[tid].takeover_lock);
if (!(h1c->wait_event.events & SUB_RETRY_SEND))
ret = h1_send(h1c);
@@ -2309,7 +2309,7 @@
/* We're about to destroy the connection, so make sure nobody attempts
* to steal it from us.
*/
- HA_SPIN_LOCK(OTHER_LOCK, &idle_conns[tid].toremove_lock);
+ HA_SPIN_LOCK(OTHER_LOCK, &idle_conns[tid].takeover_lock);
if (h1c->conn->flags & CO_FL_LIST_MASK)
MT_LIST_DEL(&h1c->conn->list);
@@ -2320,7 +2320,7 @@
if (!t->context)
h1c = NULL;
- HA_SPIN_UNLOCK(OTHER_LOCK, &idle_conns[tid].toremove_lock);
+ HA_SPIN_UNLOCK(OTHER_LOCK, &idle_conns[tid].takeover_lock);
}
task_destroy(t);