Searched refs:fetch_and_add (Results 1 – 2 of 2) sorted by relevance
55 int fetch_and_add(int* p, int i) in fetch_and_add() function108 out = fetch_and_add(&b->out, 1); in buffer_recv()111 fetch_and_add(&b->out, -BUFFER_MAX); in buffer_recv()131 in = fetch_and_add(&b->in, 1); in buffer_send()134 fetch_and_add(&b->in, -BUFFER_MAX); in buffer_send()
2023 The trick is to match "fetch_and_add(X, -C) == C".