projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove alloca(0) calls
[deliverable/binutils-gdb.git]
/
gold
/
gold-threads.cc
diff --git
a/gold/gold-threads.cc
b/gold/gold-threads.cc
index ef5b6922e313a575bc7f7ebd089b7be8133da814..36f3625e5152b2faa2c9aec80d3d71c1194ff3e9 100644
(file)
--- a/
gold/gold-threads.cc
+++ b/
gold/gold-threads.cc
@@
-1,6
+1,6
@@
// gold-threads.cc -- thread support for gold
// gold-threads.cc -- thread support for gold
-// Copyright
2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
+// Copyright
(C) 2006-2019
Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@
-100,14
+100,14
@@
Lock_impl_threads::Lock_impl_threads()
pthread_mutexattr_t attr;
int err = pthread_mutexattr_init(&attr);
if (err != 0)
pthread_mutexattr_t attr;
int err = pthread_mutexattr_init(&attr);
if (err != 0)
- gold_fatal(_("pthead_mutex
t
attr_init failed: %s"), strerror(err));
+ gold_fatal(_("pthead_mutexattr_init failed: %s"), strerror(err));
#ifdef PTHREAD_MUTEX_ADAPTIVE_NP
#ifdef PTHREAD_MUTEX_ADAPTIVE_NP
- err = pthread_mutex
t
attr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
+ err = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_ADAPTIVE_NP);
if (err != 0)
if (err != 0)
- gold_fatal(_("pthread_mutex
t
attr_settype failed: %s"), strerror(err));
+ gold_fatal(_("pthread_mutexattr_settype failed: %s"), strerror(err));
#endif
#endif
- err = pthread_mutex_init
(&this->mutex_, &attr);
+ err = pthread_mutex_init(&this->mutex_, &attr);
if (err != 0)
gold_fatal(_("pthread_mutex_init failed: %s"), strerror(err));
if (err != 0)
gold_fatal(_("pthread_mutex_init failed: %s"), strerror(err));
@@
-335,7
+335,10
@@
c_run_once(void)
// Class Once.
Once::Once()
// 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;
{
#ifndef ENABLE_THREADS
this->once_ = NULL;
@@
-404,7
+407,7
@@
Once::run_once(void* arg)
err = pthread_mutex_unlock(&once_pointer_control);
if (err != 0)
err = pthread_mutex_unlock(&once_pointer_control);
if (err != 0)
- gold_fatal(_("pthread_mutex_unlock fa
li
ed: %s"), strerror(err));
+ gold_fatal(_("pthread_mutex_unlock fa
il
ed: %s"), strerror(err));
#endif // defined(ENABLE_THREADS)
}
#endif // defined(ENABLE_THREADS)
}
This page took
0.023497 seconds
and
4
git commands to generate.