summaryrefslogtreecommitdiff
path: root/gold/workqueue.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2006-10-20 20:40:49 +0000
committerIan Lance Taylor <iant@google.com>2006-10-20 20:40:49 +0000
commit92e059d8dc78c3f65e29e48e368f6e47ea0ab671 (patch)
treef448eb3317d9cbb0f5946422cc28ef157a5f65cb /gold/workqueue.cc
parentaf4658dc3db33004d6166b161588221ecb463a5f (diff)
downloadbinutils-gdb-92e059d8dc78c3f65e29e48e368f6e47ea0ab671.tar.gz
Framework for relocation scanning. Implement simple static TLS
relocations.
Diffstat (limited to 'gold/workqueue.cc')
-rw-r--r--gold/workqueue.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/gold/workqueue.cc b/gold/workqueue.cc
index 716f93db785..3ef34225737 100644
--- a/gold/workqueue.cc
+++ b/gold/workqueue.cc
@@ -192,6 +192,8 @@ Workqueue::~Workqueue()
assert(this->running_ == 0);
}
+// Add a task to the queue.
+
void
Workqueue::queue(Task* t)
{
@@ -199,6 +201,15 @@ Workqueue::queue(Task* t)
this->tasks_.push_back(t);
}
+// Add a task to the front of the queue.
+
+void
+Workqueue::queue_front(Task* t)
+{
+ Hold_lock hl(this->tasks_lock_);
+ this->tasks_.push_front(t);
+}
+
// Clear the list of completed tasks. Return whether we cleared
// anything. The completed_lock_ must be held when this is called.