I am wanting to use the Interlocked api functions to read/write to some dwords from multiple threads. The dwords are part of a Powerbasic array of type dword. One requirement for the Interlocked api functions is that the dword being read from / written to, is that it be aligned on 32 bit boundaries in order to ensure the reads/writes are atomic.
Is it safe to assume in PB9 that the dword elements of an array of dwords will always be 32 bit aligned in memory? Would I have any potential issues using these functions with elements of a dword array?
The functions are:
InterlockedIncrement
InterlockedDecrement
and InterlockedExchange I believe
Is it safe to assume in PB9 that the dword elements of an array of dwords will always be 32 bit aligned in memory? Would I have any potential issues using these functions with elements of a dword array?
The functions are:
InterlockedIncrement
InterlockedDecrement
and InterlockedExchange I believe
Comment