diff options
author | Roland McGrath <roland@gnu.org> | 2013-10-11 21:02:43 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2013-10-11 21:02:43 +0000 |
commit | 39d9ead7fb50de3049b68021ff70bc558636ab53 (patch) | |
tree | a81611e4ff36eb21f125555402ad6b56774be0dc /gold/gold-threads.cc | |
parent | 9772d0748349e397f5b6564af529da10bc139751 (diff) | |
download | gdb-39d9ead7fb50de3049b68021ff70bc558636ab53.zip gdb-39d9ead7fb50de3049b68021ff70bc558636ab53.tar.gz gdb-39d9ead7fb50de3049b68021ff70bc558636ab53.tar.bz2 |
gold/
* gold-threads.h (Once): Conditionalize member was_run_lock_ on
[ENABLE_THREADS && __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4], matching
its only use.
* gold-threads.cc (Once::Once): Likewise conditionalize initializer.
Diffstat (limited to 'gold/gold-threads.cc')
-rw-r--r-- | gold/gold-threads.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gold/gold-threads.cc b/gold/gold-threads.cc index 38a1e16..2cb293e 100644 --- a/gold/gold-threads.cc +++ b/gold/gold-threads.cc @@ -1,6 +1,6 @@ // gold-threads.cc -- thread support for gold -// Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +// Copyright 2006, 2007, 2008, 2009, 2010, 2013 Free Software Foundation, Inc. // Written by Ian Lance Taylor <iant@google.com>. // This file is part of gold. @@ -335,7 +335,10 @@ c_run_once(void) // Class Once. Once::Once() - : was_run_(false), was_run_lock_(0) + : was_run_(false) +#if defined(ENABLE_THREADS) && defined(__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4) + , was_run_lock_(0) +#endif { #ifndef ENABLE_THREADS this->once_ = NULL; |