On 04/14/2010 06:52 PM, Blue Swirl wrote:
On 4/14/10, Gerd Hoffmann<kra...@redhat.com> wrote:+static inline void atomic_or(uint32_t *var, uint32_t add) +{ + __asm__ __volatile__ ("lock; orl %1, %0" : "+m" (*var) : "r" (add) : "memory"); +}This will break on non-x86 hosts.
I'd just use __sync_fetch_and_or here. Paolo