Merge branch 'tsan-warnings'
Fix a harmless warning from thread sanitizer and make wxAtomicInc() more useful. See #22417.
This commit is contained in:
commit
a7eee933c6
6 changed files with 72 additions and 107 deletions
9
configure
vendored
9
configure
vendored
|
|
@ -25176,8 +25176,8 @@ fi
|
|||
|
||||
|
||||
if test -n "$GCC"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins" >&5
|
||||
$as_echo_n "checking for __sync_fetch_and_add and __sync_sub_and_fetch builtins... " >&6; }
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __sync_xxx_and_fetch builtins" >&5
|
||||
$as_echo_n "checking for __sync_xxx_and_fetch builtins... " >&6; }
|
||||
if ${wx_cv_cc_gcc_atomic_builtins+:} false; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
|
|
@ -25190,10 +25190,7 @@ main ()
|
|||
{
|
||||
|
||||
unsigned int value=0;
|
||||
/* wxAtomicInc doesn't use return value here */
|
||||
__sync_fetch_and_add(&value, 2);
|
||||
__sync_sub_and_fetch(&value, 1);
|
||||
/* but wxAtomicDec does, so mimic that: */
|
||||
volatile unsigned int r1 = __sync_add_and_fetch(&value, 2);
|
||||
volatile unsigned int r2 = __sync_sub_and_fetch(&value, 1);
|
||||
|
||||
;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue