<div dir="ltr"><div><div>C++ makes my head spin (and hurt!).<br><br></div>Thanks Brad<br><br></div>Not for the hurting head, but for the solution...<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Aug 26, 2013 at 1:29 PM, Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 08/26/2013 12:05 PM, Berk Geveci wrote:<br>
> Can you try this?<br>
<br>
</div>From the patch:<br>
<br>
+ if (!vtkTimeStamp::GlobalTimeStamp)<br>
+ {<br>
+#if VTK_SIZEOF_VOID_P == 8<br>
+ vtkTimeStamp::GlobalTimeStamp = new vtkAtomicInt64;<br>
<br>
This runtime initialization is not thread-safe, which IIUC<br>
is the entire point of using an atomic integer. We can<br>
achieve proper static initialization and finalization using<br>
the same Schwarz Counter idiom:<br>
<br>
<a href="http://en.wikibooks.org/wiki/More_C++_Idioms/Nifty_Counter" target="_blank">http://en.wikibooks.org/wiki/More_C++_Idioms/Nifty_Counter</a><br>
<br>
that we already use in several places. It provides a way<br>
to order things across translation units.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Brad<br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>