| 7 | { |
| 8 | public: |
| 9 | inline void lock () |
| 10 | { |
| 11 | const auto ticket_num = next_ticket_num.fetch_add (1, std::memory_order_relaxed); |
| 12 | while (serving_ticket_num.load (std::memory_order_acquire) != ticket_num) |
| 13 | { |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | inline void unlock () |
| 18 | { |
nothing calls this directly
no outgoing calls
no test coverage detected