summaryrefslogtreecommitdiffstats
path: root/binutils-2.20.1/gold/workqueue-internal.h
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-06-17 15:33:58 -0700
committerDan Albert <danalbert@google.com>2015-06-17 15:33:58 -0700
commit7a1d76c6c5b354abbba43308d5061eb6ff96d3ea (patch)
tree78a639d039e517565afa35d7af021a6967bec0d9 /binutils-2.20.1/gold/workqueue-internal.h
parentc39479f4ab4d372b518957871e1f205a03e7c3d6 (diff)
downloadtoolchain_binutils-7a1d76c6c5b354abbba43308d5061eb6ff96d3ea.tar.gz
toolchain_binutils-7a1d76c6c5b354abbba43308d5061eb6ff96d3ea.tar.bz2
toolchain_binutils-7a1d76c6c5b354abbba43308d5061eb6ff96d3ea.zip
Remove old versions of binutils.
Change-Id: If634d8d30cfa8c88ca3ba59691a0df4ee5596f85
Diffstat (limited to 'binutils-2.20.1/gold/workqueue-internal.h')
-rw-r--r--binutils-2.20.1/gold/workqueue-internal.h109
1 files changed, 0 insertions, 109 deletions
diff --git a/binutils-2.20.1/gold/workqueue-internal.h b/binutils-2.20.1/gold/workqueue-internal.h
deleted file mode 100644
index 684c65ba..00000000
--- a/binutils-2.20.1/gold/workqueue-internal.h
+++ /dev/null
@@ -1,109 +0,0 @@
-// workqueue-internal.h -- internal work queue header for gold -*- C++ -*-
-
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
-// Written by Ian Lance Taylor <iant@google.com>.
-
-// This file is part of gold.
-
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
-// MA 02110-1301, USA.
-
-#ifndef GOLD_WORKQUEUE_INTERNAL_H
-#define GOLD_WORKQUEUE_INTERNAL_H
-
-#include <queue>
-#include <csignal>
-
-#include "gold-threads.h"
-#include "workqueue.h"
-
-// This is an internal header file for different gold workqueue
-// implementations.
-
-namespace gold
-{
-
-class Workqueue_thread;
-
-// The Workqueue_threader abstract class. This is the interface used
-// by the general workqueue code to manage threads.
-
-class Workqueue_threader
-{
- public:
- Workqueue_threader(Workqueue* workqueue)
- : workqueue_(workqueue)
- { }
- virtual ~Workqueue_threader()
- { }
-
- // Set the number of threads to use. This is ignored when not using
- // threads.
- virtual void
- set_thread_count(int) = 0;
-
- // Return whether to cancel the current thread.
- virtual bool
- should_cancel_thread() = 0;
-
- protected:
- // Get the Workqueue.
- Workqueue*
- get_workqueue()
- { return this->workqueue_; }
-
- private:
- // The Workqueue.
- Workqueue* workqueue_;
-};
-
-// The threaded instantiation of Workqueue_threader.
-
-class Workqueue_threader_threadpool : public Workqueue_threader
-{
- public:
- Workqueue_threader_threadpool(Workqueue*);
-
- ~Workqueue_threader_threadpool();
-
- // Set the thread count.
- void
- set_thread_count(int);
-
- // Return whether to cancel a thread.
- bool
- should_cancel_thread();
-
- // Process all tasks. This keeps running until told to cancel.
- void
- process(int thread_number)
- { this->get_workqueue()->process(thread_number); }
-
- private:
- // This is set if we need to check the thread count.
- volatile sig_atomic_t check_thread_count_;
-
- // Lock for the remaining members.
- Lock lock_;
- // The number of threads we want to create. This is set to zero
- // when all threads should exit.
- int desired_thread_count_;
- // The number of threads currently running.
- int threads_;
-};
-
-} // End namespace gold.
-
-#endif // !defined(GOLD_WORKQUEUE_INTERNAL_H)