mirror of
https://github.com/haproxy/haproxy.git
synced 2026-03-27 21:06:45 -04:00
When a frequency counter must be updated, we use the curr_sec/curr_tick fields as a lock, by setting the MSB to 1 in a compare-and-swap to lock and by reseting it to unlock. And when we need to read it, we loop until the counter is unlocked. This way, the frequency counters are thread-safe without any external lock. It is important to avoid increasing the size of many structures (global, proxy, server, stick_table). |
||
|---|---|---|
| .. | ||
| common | ||
| import | ||
| proto | ||
| types | ||