On Thu, Oct 04, 2018 at 01:42:23PM -0400, Frediano Ziglio wrote: > > -static inline void set_bit(int index, uint32_t *addr) > > -{ > > - uint32_t mask = 1 << index; > > - __sync_or_and_fetch(addr, mask); > > -} > > - > > -static inline void clear_bit(int index, uint32_t *addr) > > -{ > > - uint32_t mask = ~(1 << index); > > - __sync_and_and_fetch(addr, mask); > > -} > > - > > -static inline int test_bit(int index, uint32_t val) > > -{ > > - return val & (1u << index); > > -} > > /* a generic safe for loop macro */ > > #define SAFE_FOREACH(link, next, cond, ring, data, get_data) \ > > for ((((link) = ((cond) ? ring_get_head(ring) : NULL)), \ > > I prefer them in utils.h, they don't have something to do specifically > with qxl interface. That's true, on the other hand, these are not methods we want to use outside of the QXL interface. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel