I'd like to write a function that is accessible only by a single thread at a time. I don't need busy waits, a brutal 'rejection' is enough if another thread is already running it. This is what I have come up with so far:

```
std::atomic<bool> busy (false);

bool func()
{
    if (m_busy.exchange(true) == true)
        return false;  

    // ... do stuff ...

    m_busy.exchange(false);
    return true;
}

```

1. Is the logic for the atomic exchange correct?
2. Is it correct to mark the two atomic operations as `std::memory_order_acq_rel`? As far as I understand a relaxed ordering (`std::memory_order_relaxed`) wouldn't be enough to prevent reordering.