[vlc-devel] [vlc-commits] commit: Atomic operations (currently same ones as in garbage collector) ( Rémi Denis-Courmont )

Rémi Denis-Courmont remi at remlab.net
Tue Jun 29 01:31:12 CEST 2010


----- Message d'origine -----
> On Mon, Jun 28, 2010 at 01:31:55AM +0200, git at videolan.org wrote :
> > +uintptr_t vlc_atomic_add (vlc_atomic_t *atom, uintptr_t v)
> > +{
> > +#if defined (WIN64)
> > +      return InterlockedAdd64 (&atom->s, v);
> > +#else
> > +      return InterlockedAdd (&atom->s, v);
> > +#endif
> > +}
>
> Aren't those only defined in Itanium ? At least MSDN seems to say so.

I dont know. I would rather use the GCC intrinsics. But VLC 1.0 and 1.1 use InterlockedIncrement so it seemed logical to use InterlockedAdd.



More information about the vlc-devel mailing list