MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / lock

Method lock

src/utils/inc/ticket_lock.h:9–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7{
8public:
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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected