|
From: | Gerd Hoffmann |
Subject: | [Qemu-devel] Re: [RfC PATCH 08/11] spice: add qxl device |
Date: | Fri, 16 Apr 2010 10:02:14 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4 |
On 04/15/10 01:08, Paolo Bonzini wrote:
On 04/14/2010 06:52 PM, Blue Swirl wrote:On 4/14/10, Gerd Hoffmann<address@hidden> 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.
Good idea. I think we can zap the memory barrier and fix a small race while being at it, see the incremental fix below.
cheers, Gerd
fix
Description: Text document
[Prev in Thread] | Current Thread | [Next in Thread] |