3 ms·
The requirement is generally that it can be written in a single instruction. This can fail on 32-bit processors like the x86 if you use a 64-bit index. For emb
by tlb 8y ago
The requirement is generally that it can be written in a single instruction.
This can fail on 32-bit processors like the x86 if you use a 64-bit index. For embedded work, it can fail on 8-bit processors if you use a 16-bit index.
You can check, in C++, whether operations on a type are a single instruction. This might be true on an x84_64 and false on an x86:
std::atomic<int64_t>::is_lock_free()