Commit Graph

4 Commits

Author SHA1 Message Date
Vadim Zeitlin
15a1c3b2ef Work around g++ atomic builtins detection in configure when -Os is used.
Assigning __sync_sub_and_fetch() result to an unused variable can result in it
being optimized away and the function support is then not really tested for,
see #4542. So do make sure this variable is kept by making it volatile.

Closes #15555.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74934 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-04 23:48:22 +00:00
Václav Slavík
9d5507f7a2 check that the version of __sync_sub_and_fetch that returns a value is supported, not just the void one
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50480 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-05 10:51:28 +00:00
Václav Slavík
9dcff96ba9 when testing for GCC's atomic builtins, try to link too (see bug #1844128); also more closely mirror wx's use by using unsigned int and not int for tests
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-12-04 15:29:17 +00:00
Václav Slavík
479647105b Fixed wxAtomicInc/Dec() to not use asm/atomic.h header on Linux - it's kernel internal, not available for userspace in newer kernel versions and broken for userspace on some platforms. Use GCC's builtins instead.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48640 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-09-10 22:27:15 +00:00