ConradATPG
Member level 1
I am developing a threaded application to run on a MAC that needs to run on many UNIX platforms. Apple has a function (OSAtomicTestAndSetBarrier) that takes a index into an array of bits, sets the bit and returns whether the bit was set previous. This function is uninterruptible and used to synchronize access to a data structures by threads.
bool OSAtomicTestAndSetBarrier(uint32_t n, volatile void *theAddress);
I think that this function is proprietary so I need a similar function that is part of the standard threads library or source code that can be compiled to run on different UNIX machines. Any suggestions?
bool OSAtomicTestAndSetBarrier(uint32_t n, volatile void *theAddress);
I think that this function is proprietary so I need a similar function that is part of the standard threads library or source code that can be compiled to run on different UNIX machines. Any suggestions?