[prev in list] [next in list] [prev in thread] [next in thread] 

List:       taglib-devel
Subject:    Re: iterators+multithreading on win32
From:       "Stephen F. Booth" <me () sbooth ! org>
Date:       2011-03-11 16:07:48
Message-ID: AANLkTikM148SoerZ4=WbBK3X6mmUFrXmiwSfDjzV3vRG () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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=C3=A1=C5=A1 Lalinsk=C3=BD <lalinsky@gmail.com>

> On Sun, Mar 6, 2011 at 12:11 AM, Stephen F. Booth <me@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
>

[Attachment #5 (text/html)]

I&#39;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&#39;t \
necessary.   Only in the general CAS case (for pointers, etc) were barriers \
required.<div> <br></div><div>Stephen<br><br><div class="gmail_quote">2011/3/11 \
Lukáš Lalinský <span dir="ltr">&lt;<a \
href="mailto:lalinsky@gmail.com">lalinsky@gmail.com</a>&gt;</span><br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex;"> <div class="im">On Sun, Mar 6, 2011 at 12:11 AM, Stephen F. \
Booth &lt;<a href="mailto:me@sbooth.org">me@sbooth.org</a>&gt; wrote:<br> &gt; \
I&#39;m not familiar with atomic operations on Windows or Linux, but I&#39;ve<br> \
&gt; attached my first stab at a patch that makes RefCounter use atomic increment<br> \
&gt; and decrement operations on OS X.<br> &gt; I doubt this will take care of \
everything, but it should be a start.<br> <br>
</div>I think that we should be using OSAtomicDecrement32Barrier and<br>
OSAtomicIncrement32Barrier, but otherwise it looks fine. Nick already<br>
committed the code to SVN, including a Windows version. I&#39;ll steal<br>
some code from boost to make it work on other platforms too (or<br>
perhaps we could optionally depend on boost?). These changes will not<br>
be released in 1.7, which really should have been released already,<br>
but in the next release.<br>
<br>
Lukas<br>
</blockquote></div><br></div>



_______________________________________________
taglib-devel mailing list
taglib-devel@kde.org
https://mail.kde.org/mailman/listinfo/taglib-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic