unsigned long thread_mask; /* mask of thread IDs authorized to process the applet */
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) */
union {
struct {
const char *msg; /* pointer to a persistent message to be returned in CLI_ST_PRINT state */
int severity; /* severity of the message to be returned according to (syslog) rfc5424 */
char *err; /* pointer to a 'must free' message to be returned in CLI_ST_PRINT_FREE state */
- struct list l0; /* General purpose list element, pointers, offsets and integers for... */
void *p0, *p1, *p2; /* ...registered commands, initialized to 0 by the CLI before first... */
size_t o0, o1; /* ...invocation of the keyword parser, except for the list element which... */
int i0, i1; /* ...is initialized with LIST_INIT(). */
sent = lenlen + totlen + 1;
/* notify potential readers */
- list_for_each_entry(appctx, &ring->waiters, ctx.cli.l0)
+ list_for_each_entry(appctx, &ring->waiters, wait_entry)
appctx_wakeup(appctx);
done_buf:
return 1;
HA_RWLOCK_WRLOCK(LOGSRV_LOCK, &ring->lock);
- LIST_DEL_INIT(&appctx->ctx.cli.l0);
+ LIST_DEL_INIT(&appctx->wait_entry);
HA_RWLOCK_WRUNLOCK(LOGSRV_LOCK, &ring->lock);
HA_RWLOCK_RDLOCK(LOGSRV_LOCK, &ring->lock);
if (!si_oc(si)->output && !(si_oc(si)->flags & CF_SHUTW)) {
/* let's be woken up once new data arrive */
HA_RWLOCK_WRLOCK(LOGSRV_LOCK, &ring->lock);
- LIST_ADDQ(&ring->waiters, &appctx->ctx.cli.l0);
+ LIST_ADDQ(&ring->waiters, &appctx->wait_entry);
HA_RWLOCK_WRUNLOCK(LOGSRV_LOCK, &ring->lock);
si_rx_endp_done(si);
ret = 0;
/* reader was still attached */
ofs -= ring->ofs;
BUG_ON(ofs >= b_size(&ring->buf));
- LIST_DEL_INIT(&appctx->ctx.cli.l0);
+ LIST_DEL_INIT(&appctx->wait_entry);
HA_ATOMIC_SUB(b_peek(&ring->buf, ofs), 1);
}
HA_ATOMIC_SUB(&ring->readers_count, 1);