iterators+multithreading on win32

Stephen F. Booth me at sbooth.org
Fri Mar 11 17:07:48 CET 2011


I'm far from an expert but I always thought that if you were operating on a
self-contained 32 or 64 bit quantity (like a number) then memory barriers
weren't necessary.  Only in the general CAS case (for pointers, etc) were
barriers required.

Stephen

2011/3/11 Lukáš Lalinský <lalinsky at gmail.com>

> On Sun, Mar 6, 2011 at 12:11 AM, Stephen F. Booth <me at sbooth.org> wrote:
> > I'm not familiar with atomic operations on Windows or Linux, but I've
> > attached my first stab at a patch that makes RefCounter use atomic
> increment
> > and decrement operations on OS X.
> > I doubt this will take care of everything, but it should be a start.
>
> I think that we should be using OSAtomicDecrement32Barrier and
> OSAtomicIncrement32Barrier, but otherwise it looks fine. Nick already
> committed the code to SVN, including a Windows version. I'll steal
> some code from boost to make it work on other platforms too (or
> perhaps we could optionally depend on boost?). These changes will not
> be released in 1.7, which really should have been released already,
> but in the next release.
>
> Lukas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/taglib-devel/attachments/20110311/28bbed77/attachment.htm 


More information about the taglib-devel mailing list