mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-12 23:33:14 -05:00
In the struct fdtab, introduce a new mask, running_mask. Each thread should add its bit before using the fd. Use the running_mask instead of a lock, in fd_insert/fd_delete, we'll just spin as long as the mask is non-zero, to be sure we access the data exclusively. fd_set_running_excl() spins until the mask is 0, fd_set_running() just adds the thread bit, and fd_clr_running() removes it. |
||
|---|---|---|
| .. | ||
| common | ||
| import | ||
| proto | ||
| types | ||