<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libatomic_ops.git, branch draft-coveralls-linux</title>
<subtitle>github.com: ivmai/libatomic_ops.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/'/>
<entry>
<title>DRAFT #20 - enable coveralls (linux/gcc)</title>
<updated>2017-01-24T20:12:34+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-13T18:10:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=c50fb83f038a6e06afdf6b2dfc6868b364fb0511'/>
<id>c50fb83f038a6e06afdf6b2dfc6868b364fb0511</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix test_atomic failure caused unaligned AO_double_t access on x86</title>
<updated>2017-01-24T19:51:19+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-24T19:46:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=d1ad2daa7e195c82e3e5423e31af90fb01f7307d'/>
<id>d1ad2daa7e195c82e3e5423e31af90fb01f7307d</id>
<content type='text'>
The failure is caused by violation of an assertion that checks
AO_double_t variable is 8-byte aligned on x86.

* doc/README.txt (AO_double_t): Add note about required alignment.
* src/atomic_ops/sysdeps/standard_ao_double_t.h (AO_double_t): Add
comment about alignment.
* src/atomic_ops_stack.h (AO_stack_t): Likewise.
* tests/test_atomic_include.template (test_atomicXX): Define old_w, w
local variables as static (as otherwise, e.g., they could have 4-byte
alignment on x86); add comment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The failure is caused by violation of an assertion that checks
AO_double_t variable is 8-byte aligned on x86.

* doc/README.txt (AO_double_t): Add note about required alignment.
* src/atomic_ops/sysdeps/standard_ao_double_t.h (AO_double_t): Add
comment about alignment.
* src/atomic_ops_stack.h (AO_stack_t): Likewise.
* tests/test_atomic_include.template (test_atomicXX): Define old_w, w
local variables as static (as otherwise, e.g., they could have 4-byte
alignment on x86); add comment.
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "Fix test_atomic fail caused unaligned AO_double_t access (VC/x86)"</title>
<updated>2017-01-24T19:50:46+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-24T14:49:58+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=4949e9b8cb409288fcaa0553ead9704ca6219a23'/>
<id>4949e9b8cb409288fcaa0553ead9704ca6219a23</id>
<content type='text'>
This reverts commit 69c4010c1b3d43e2e179421e27379aaa5aeeb6d8.

The failure is actually caused by the fact that default alignment of
stack on x86 is 4 bytes.
So, another solution should be proposed to fix the issue for other
compilers (and, potentially, other targets).  E.g. do not place
AO_double_t volatile variables on stack.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 69c4010c1b3d43e2e179421e27379aaa5aeeb6d8.

The failure is actually caused by the fact that default alignment of
stack on x86 is 4 bytes.
So, another solution should be proposed to fix the issue for other
compilers (and, potentially, other targets).  E.g. do not place
AO_double_t volatile variables on stack.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement char CAS and char/short add for msftc X86[_64] (VS 2013+)</title>
<updated>2017-01-23T22:42:06+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-23T22:42:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=90281551455f043fc027ad98ac9e7063803b7b31'/>
<id>90281551455f043fc027ad98ac9e7063803b7b31</id>
<content type='text'>
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800]
(_InterlockedCompareExchange8): Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED &amp;&amp; !_M_ARM] (_InterlockedExchangeAdd16,
_InterlockedExchangeAdd8): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800]
(_InterlockedCompareExchange8): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED] (_InterlockedExchangeAdd16,
_InterlockedExchangeAdd8): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800]
(AO_char_fetch_compare_and_swap_full): Implement using intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED &amp;&amp; !_M_ARM] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800]
(AO_char_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86.h [!AO_NO_ASM_XADD]
(AO_char_fetch_and_add_full, AO_short_fetch_and_add_full): Do not
define if AO_HAVE_char_fetch_and_add_full.
* src/atomic_ops/sysdeps/msftc/x86_64.h [AO_ASM_X64_AVAILABLE]
(AO_char_fetch_and_add_full, AO_short_fetch_and_add_full): Do not use
asm-based implementation if _MSC_VER&gt;=1800.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800]
(_InterlockedCompareExchange8): Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED &amp;&amp; !_M_ARM] (_InterlockedExchangeAdd16,
_InterlockedExchangeAdd8): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800]
(_InterlockedCompareExchange8): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED] (_InterlockedExchangeAdd16,
_InterlockedExchangeAdd8): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800]
(AO_char_fetch_compare_and_swap_full): Implement using intrinsic.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED &amp;&amp; !_M_ARM] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800]
(AO_char_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86.h [!AO_NO_ASM_XADD]
(AO_char_fetch_and_add_full, AO_short_fetch_and_add_full): Do not
define if AO_HAVE_char_fetch_and_add_full.
* src/atomic_ops/sysdeps/msftc/x86_64.h [AO_ASM_X64_AVAILABLE]
(AO_char_fetch_and_add_full, AO_short_fetch_and_add_full): Do not use
asm-based implementation if _MSC_VER&gt;=1800.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement short inc/dec directly for msftc ARM and X86[_64]</title>
<updated>2017-01-23T22:32:41+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-23T22:32:41+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=a013152ae8fb09223b91f3183b40869960a7a79e'/>
<id>a013152ae8fb09223b91f3183b40869960a7a79e</id>
<content type='text'>
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !AO_PREFER_GENERALIZED] (_InterlockedIncrement16,
_InterlockedDecrement16): Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;1400
&amp;&amp; !AO_PREFER_GENERALIZED] (_InterlockedIncrement16,
_InterlockedDecrement16): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !AO_PREFER_GENERALIZED] (AO_short_fetch_and_add1_full,
AO_short_fetch_and_sub1_full): Implement using intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !AO_PREFER_GENERALIZED] (_InterlockedIncrement16,
_InterlockedDecrement16): Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;1400
&amp;&amp; !AO_PREFER_GENERALIZED] (_InterlockedIncrement16,
_InterlockedDecrement16): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !AO_PREFER_GENERALIZED] (AO_short_fetch_and_add1_full,
AO_short_fetch_and_sub1_full): Implement using intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;=1800
&amp;&amp; !AO_PREFER_GENERALIZED] (AO_char_fetch_and_add_full,
AO_short_fetch_and_add_full): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Really implement char and/or/xor and short CAS for msftc ARM (VS 2013+)</title>
<updated>2017-01-23T21:26:23+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-23T21:26:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=cf9732e5e7e49e5409a8d80336a028046913e448'/>
<id>cf9732e5e7e49e5409a8d80336a028046913e448</id>
<content type='text'>
(fix commit 9182c62)

* src/atomic_ops/sysdeps/msftc/common32_defs.h [_M_ARM]
(_InterlockedAnd8, _InterlockedCompareExchange16, _InterlockedOr8,
_InterlockedXor8): Declare intrinsic if _MSC_VER&gt;=1800.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_M_ARM]
(AO_char_and_full, AO_char_or_full, AO_char_xor_full,
AO_short_fetch_compare_and_swap_full): Implement (using intrinsic) if
_MSC_VER&gt;=1800.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
(fix commit 9182c62)

* src/atomic_ops/sysdeps/msftc/common32_defs.h [_M_ARM]
(_InterlockedAnd8, _InterlockedCompareExchange16, _InterlockedOr8,
_InterlockedXor8): Declare intrinsic if _MSC_VER&gt;=1800.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_M_ARM]
(AO_char_and_full, AO_char_or_full, AO_char_xor_full,
AO_short_fetch_compare_and_swap_full): Implement (using intrinsic) if
_MSC_VER&gt;=1800.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement char and/or/xor and short CAS for msftc ARM and X86[_64]</title>
<updated>2017-01-23T08:04:21+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-21T06:55:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=9182c620e181947df4a402322141b86ffdd0d4be'/>
<id>9182c620e181947df4a402322141b86ffdd0d4be</id>
<content type='text'>
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !_M_ARM] (_InterlockedAnd8, _InterlockedCompareExchange16,
_InterlockedOr8, _InterlockedXor8): Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;1400]
(_InterlockedAnd8, _InterlockedCompareExchange16, _InterlockedOr8,
_InterlockedXor8): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !_M_ARM] (AO_char_and_full, AO_char_or_full, AO_char_xor_full,
AO_short_fetch_compare_and_swap_full): Implement (using intrinsic).
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;1400]
(AO_char_and_full, AO_char_or_full, AO_char_xor_full,
AO_short_fetch_compare_and_swap_full): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !_M_ARM] (_InterlockedAnd8, _InterlockedCompareExchange16,
_InterlockedOr8, _InterlockedXor8): Declare intrinsic.
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;1400]
(_InterlockedAnd8, _InterlockedCompareExchange16, _InterlockedOr8,
_InterlockedXor8): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [_MSC_VER&gt;1400
&amp;&amp; !_M_ARM] (AO_char_and_full, AO_char_or_full, AO_char_xor_full,
AO_short_fetch_compare_and_swap_full): Implement (using intrinsic).
* src/atomic_ops/sysdeps/msftc/x86_64.h [_MSC_VER&gt;1400]
(AO_char_and_full, AO_char_or_full, AO_char_xor_full,
AO_short_fetch_compare_and_swap_full): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove redundant include windows.h from headers (msftc/x86[_64])</title>
<updated>2017-01-20T16:23:45+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-20T16:23:45+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=4a871e01583aab0d8a040ec84113f7b0b60200d9'/>
<id>4a871e01583aab0d8a040ec84113f7b0b60200d9</id>
<content type='text'>
* src/atomic_ops/sysdeps/msftc/common32_defs.h: Do not include windows.h
if _MSC_VER &gt; 1400 &amp;&amp; AO_USE_INTERLOCKED_INTRINSICS &amp;&amp; !_WIN32_WCE.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [!AO_PREFER_GENERALIZED
|| !AO_ASSUME_WINDOWS98] (AO_fetch_and_add_full, AO_fetch_and_add1_full,
AO_fetch_and_sub1_full): Replace LONG to long; remove unnecessary cast
to LONG.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [AO_ASSUME_WINDOWS98]
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h
(AO_int_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [!AO_PREFER_GENERALIZED]
(AO_int_fetch_and_add_full, AO_int_fetch_and_add1_full,
AO_int_fetch_and_sub1_full): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [AO_ASSUME_WINDOWS98]
(AO_fetch_compare_and_swap_full): Replace PVOID to void*; remove
unnecessary cast to AO_t.
* src/atomic_ops/sysdeps/msftc/x86_64.h: Remove include windows.h.
* src/atomic_ops/sysdeps/msftc/x86_64.h [!AO_PREFER_GENERALIZED]
(AO_fetch_and_add_full, AO_fetch_and_add1_full, AO_fetch_and_sub1_full):
Replace LONGLONG to __int64; remove unnecessary cast to LONGLONG.
* src/atomic_ops/sysdeps/msftc/x86_64.h
(AO_fetch_compare_and_swap_full): Likewise.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* src/atomic_ops/sysdeps/msftc/common32_defs.h: Do not include windows.h
if _MSC_VER &gt; 1400 &amp;&amp; AO_USE_INTERLOCKED_INTRINSICS &amp;&amp; !_WIN32_WCE.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [!AO_PREFER_GENERALIZED
|| !AO_ASSUME_WINDOWS98] (AO_fetch_and_add_full, AO_fetch_and_add1_full,
AO_fetch_and_sub1_full): Replace LONG to long; remove unnecessary cast
to LONG.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [AO_ASSUME_WINDOWS98]
(AO_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h
(AO_int_fetch_compare_and_swap_full): Likewise.
* src/atomic_ops/sysdeps/msftc/x86_64.h [!AO_PREFER_GENERALIZED]
(AO_int_fetch_and_add_full, AO_int_fetch_and_add1_full,
AO_int_fetch_and_sub1_full): Likewise.
* src/atomic_ops/sysdeps/msftc/common32_defs.h [AO_ASSUME_WINDOWS98]
(AO_fetch_compare_and_swap_full): Replace PVOID to void*; remove
unnecessary cast to AO_t.
* src/atomic_ops/sysdeps/msftc/x86_64.h: Remove include windows.h.
* src/atomic_ops/sysdeps/msftc/x86_64.h [!AO_PREFER_GENERALIZED]
(AO_fetch_and_add_full, AO_fetch_and_add1_full, AO_fetch_and_sub1_full):
Replace LONGLONG to __int64; remove unnecessary cast to LONGLONG.
* src/atomic_ops/sysdeps/msftc/x86_64.h
(AO_fetch_compare_and_swap_full): Likewise.
</pre>
</div>
</content>
</entry>
<entry>
<title>Always define word-wide CAS for x86 (MS VC++ 8 or later)</title>
<updated>2017-01-20T15:15:18+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-20T15:10:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=686e915d830d5f3ddd44567952626ff67d67d19a'/>
<id>686e915d830d5f3ddd44567952626ff67d67d19a</id>
<content type='text'>
Visual Studio 2005 (MS VC++ 8.0) discontinued support of Windows 95.
This patch deprecates AO_ASSUME_WINDOWS98 macro.

* configure.ac (AO_ASSUME_WINDOWS98): Remove AH template.
* doc/README.txt (AO_ASSUME_WINDOWS98): Remove documentation (as
relates only to Win95).
* doc/README_win32.txt (AO_ASSUME_WINDOWS98): Likwise.
* doc/README_win32.txt (AO_ASSUME_VISTA): Update documentation.
* src/Makefile.msft (CFLAGS): Remove "-D AO_ASSUME_WINDOWS98".
* src/Makefile.msft (test_atomic_w95): Remove target.
* src/Makefile.msft (check): Do not call test_atomic_w95; remove the
corresponding printed message.
* src/atomic_ops/sysdeps/msftc/x86.h: Remove AO_ASSUME_WINDOWS98 from
comment.
* src/atomic_ops/sysdeps/msftc/x86.h (AO_ASSUME_WINDOWS98): Define
(implicitly) if _MSC_VER &gt;= 1400.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Visual Studio 2005 (MS VC++ 8.0) discontinued support of Windows 95.
This patch deprecates AO_ASSUME_WINDOWS98 macro.

* configure.ac (AO_ASSUME_WINDOWS98): Remove AH template.
* doc/README.txt (AO_ASSUME_WINDOWS98): Remove documentation (as
relates only to Win95).
* doc/README_win32.txt (AO_ASSUME_WINDOWS98): Likwise.
* doc/README_win32.txt (AO_ASSUME_VISTA): Update documentation.
* src/Makefile.msft (CFLAGS): Remove "-D AO_ASSUME_WINDOWS98".
* src/Makefile.msft (test_atomic_w95): Remove target.
* src/Makefile.msft (check): Do not call test_atomic_w95; remove the
corresponding printed message.
* src/atomic_ops/sysdeps/msftc/x86.h: Remove AO_ASSUME_WINDOWS98 from
comment.
* src/atomic_ops/sysdeps/msftc/x86.h (AO_ASSUME_WINDOWS98): Define
(implicitly) if _MSC_VER &gt;= 1400.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix test_atomic failure caused unaligned AO_double_t access on x86 (VC++)</title>
<updated>2017-01-20T08:58:13+00:00</updated>
<author>
<name>Ivan Maidanski</name>
<email>ivmai@mail.ru</email>
</author>
<published>2017-01-20T08:58:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libatomic_ops.git/commit/?id=69c4010c1b3d43e2e179421e27379aaa5aeeb6d8'/>
<id>69c4010c1b3d43e2e179421e27379aaa5aeeb6d8</id>
<content type='text'>
Passing an unaligned AO_double_t pointer to AO double-wide primitives
results in an undefined behavior of the latter when running on x86 (or
violation of the corresponding assertion on the alignment).
MS VC++/x86 aligns AO_double_t values on a 4-byte boundary by default.
For the proper alignment, __declspec(align(8)) should be applied to
variables defined in the client code (which uses double-wide AO
primitives).  Unfortunately, the attribute cannot be added to
AO_double_t definition itself because the compiler does not allow the
attribute for function arguments.

This patch introduces AO_DOUBLE_ALIGN attribute for use by clients of
the double-wide AO primitives (and, thus, AO_stack clients).
Matters only Visual Studio compiler for X86.
The inner clients (atomic_ops_malloc, test_atomic, test_stack) are
updated to use this attribute.

* doc/README_win32.txt [x86] (AO_DOUBLE_ALIGN): Document.
* src/atomic_ops/sysdeps/generic_pthread.h (AO_DOUBLE_ALIGN): Define
(as empty).
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!_WIN64 &amp;&amp; _WIN32
&amp;&amp; !__GNUC__ &amp;&amp; _MSC_VER] (AO_DOUBLE_ALIGN): Define as declspec
align(8); document it.
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Define as empty (otherwise).
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE &amp;&amp; !AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Likewise.
* src/atomic_ops_malloc.c (AO_free_list): Use AO_DOUBLE_ALIGN attribute.
* tests/test_stack.c (the_list): Likewise.
* src/atomic_ops_stack.h [!AO_USE_ALMOST_LOCK_FREE] (AO_stack_t):
Document AO_DOUBLE_ALIGN usage (by clients).
* tests/test_atomic_include.template (test_atomicXX): Use
AO_DOUBLE_ALIGN attribute for old_w and w double-wide local variables
(to avoid alignment assertion violation or AO primitives undefined
behavior on x86 if the test code is compiled by VC++).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Passing an unaligned AO_double_t pointer to AO double-wide primitives
results in an undefined behavior of the latter when running on x86 (or
violation of the corresponding assertion on the alignment).
MS VC++/x86 aligns AO_double_t values on a 4-byte boundary by default.
For the proper alignment, __declspec(align(8)) should be applied to
variables defined in the client code (which uses double-wide AO
primitives).  Unfortunately, the attribute cannot be added to
AO_double_t definition itself because the compiler does not allow the
attribute for function arguments.

This patch introduces AO_DOUBLE_ALIGN attribute for use by clients of
the double-wide AO primitives (and, thus, AO_stack clients).
Matters only Visual Studio compiler for X86.
The inner clients (atomic_ops_malloc, test_atomic, test_stack) are
updated to use this attribute.

* doc/README_win32.txt [x86] (AO_DOUBLE_ALIGN): Document.
* src/atomic_ops/sysdeps/generic_pthread.h (AO_DOUBLE_ALIGN): Define
(as empty).
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!_WIN64 &amp;&amp; _WIN32
&amp;&amp; !__GNUC__ &amp;&amp; _MSC_VER] (AO_DOUBLE_ALIGN): Define as declspec
align(8); document it.
* src/atomic_ops/sysdeps/standard_ao_double_t.h [!AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Define as empty (otherwise).
* src/atomic_ops_stack.h [AO_USE_ALMOST_LOCK_FREE &amp;&amp; !AO_DOUBLE_ALIGN]
(AO_DOUBLE_ALIGN): Likewise.
* src/atomic_ops_malloc.c (AO_free_list): Use AO_DOUBLE_ALIGN attribute.
* tests/test_stack.c (the_list): Likewise.
* src/atomic_ops_stack.h [!AO_USE_ALMOST_LOCK_FREE] (AO_stack_t):
Document AO_DOUBLE_ALIGN usage (by clients).
* tests/test_atomic_include.template (test_atomicXX): Use
AO_DOUBLE_ALIGN attribute for old_w and w double-wide local variables
(to avoid alignment assertion violation or AO primitives undefined
behavior on x86 if the test code is compiled by VC++).
</pre>
</div>
</content>
</entry>
</feed>
