We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
It depends what you are using it for TBH. If you are using it like a spinlock (e.g., incref to lock, decref to unlock) then you need barriers after the lock before you touch the memory it is protecting (ensure that the lock is committed before other instructions in the instruction stream can touch the memory) and before the unlock (ensure you've committed data it is protecting to memory before you release the lock). If you don't then you risk race conditions and trampled data (and much painful debugging - trust me). If you are just using it like a reference count then you might get away with it