projects
/
deliverable
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ubsan: microblaze: left shift cannot be represented in type 'int'
[deliverable/binutils-gdb.git]
/
gold
/
workqueue-threads.cc
diff --git
a/gold/workqueue-threads.cc
b/gold/workqueue-threads.cc
index ae09e29cf191b69a43cc54d8d01d699c78a66b7e..0acb4d5c9aa07d707de7b1bfe914f34983f5e3cf 100644
(file)
--- a/
gold/workqueue-threads.cc
+++ b/
gold/workqueue-threads.cc
@@
-1,6
+1,6
@@
// workqueue-threads.cc -- the threaded workqueue for gold
// workqueue-threads.cc -- the threaded workqueue for gold
-// Copyright
2007
Free Software Foundation, Inc.
+// Copyright
(C) 2007-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.
@@
-174,7
+174,7
@@
Workqueue_threader_threadpool::set_thread_count(int thread_count)
// Return whether the current thread should be cancelled.
bool
// Return whether the current thread should be cancelled.
bool
-Workqueue_threader_threadpool::should_cancel_thread()
+Workqueue_threader_threadpool::should_cancel_thread(
int thread_number
)
{
// Fast exit without taking a lock.
if (!this->check_thread_count_)
{
// Fast exit without taking a lock.
if (!this->check_thread_count_)
@@
-182,12
+182,13
@@
Workqueue_threader_threadpool::should_cancel_thread()
{
Hold_lock hl(this->lock_);
{
Hold_lock hl(this->lock_);
- if (th
is->threads_
> this->desired_thread_count_)
+ if (th
read_number
> this->desired_thread_count_)
{
--this->threads_;
{
--this->threads_;
+ if (this->threads_ <= this->desired_thread_count_)
+ this->check_thread_count_ = 0;
return true;
}
return true;
}
- this->check_thread_count_ = 0;
}
return false;
}
return false;
This page took
0.035035 seconds
and
4
git commands to generate.