mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-21 17:53:29 +02:00
MEDIUM: ring/applet: turn the wait_entry list to an mt_list instead
Rings are keeping a lock only for the list, which apparently doesn't need anything more than an mt_list, so let's first turn it into that before dropping the lock. There should be no visible effect.
This commit is contained in:
@@ -97,7 +97,7 @@ struct appctx {
|
||||
struct buffer_wait buffer_wait; /* position in the list of objects waiting for a buffer */
|
||||
struct task *t; /* task associated to the applet */
|
||||
struct freq_ctr call_rate; /* appctx call rate */
|
||||
struct list wait_entry; /* entry in a list of waiters for an event (e.g. ring events) */
|
||||
struct mt_list wait_entry; /* entry in a list of waiters for an event (e.g. ring events) */
|
||||
|
||||
/* The pointer seen by application code is appctx->svcctx. In 2.7 the
|
||||
* anonymous union and the "ctx" struct disappeared, and the struct
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
struct dns_ring {
|
||||
struct buffer buf; // storage area
|
||||
struct list waiters; // list of waiters, for now, CLI "show event"
|
||||
struct mt_list waiters; // list of waiters, for now, CLI "show event"
|
||||
__decl_thread(HA_RWLOCK_T lock);
|
||||
int readers_count;
|
||||
};
|
||||
|
||||
@@ -121,7 +121,7 @@ struct ring_storage {
|
||||
/* this is the ring definition, config, waiters etc */
|
||||
struct ring {
|
||||
struct ring_storage *storage; // the mapped part
|
||||
struct list waiters; // list of waiters, for now, CLI "show event"
|
||||
struct mt_list waiters; // list of waiters, for now, CLI "show event"
|
||||
__decl_thread(HA_RWLOCK_T lock);
|
||||
int readers_count;
|
||||
uint flags; // RING_FL_*
|
||||
|
||||
Reference in New Issue
Block a user