From c79126688f8211ab17a893c5e80b09811d424fc1 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 22 Nov 2007 00:05:51 +0000 Subject: Add threading support. --- gold/reloc.cc | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'gold/reloc.cc') diff --git a/gold/reloc.cc b/gold/reloc.cc index ab74498..d50674f 100644 --- a/gold/reloc.cc +++ b/gold/reloc.cc @@ -63,6 +63,14 @@ Read_relocs::run(Workqueue* workqueue) this->symtab_lock_, this->blocker_)); } +// Return a debugging name for the task. + +std::string +Read_relocs::get_name() const +{ + return "Read_relocs " + this->object_->name(); +} + // Scan_relocs methods. // These tasks scan the relocations read by Read_relocs and mark up @@ -114,6 +122,14 @@ Scan_relocs::run(Workqueue*) this->rd_ = NULL; } +// Return a debugging name for the task. + +std::string +Scan_relocs::get_name() const +{ + return "Scan_relocs " + this->object_->name(); +} + // Relocate_task methods. // We may have to wait for the output sections to be written. @@ -125,6 +141,9 @@ Relocate_task::is_runnable(Workqueue*) && this->output_sections_blocker_->is_blocked()) return IS_BLOCKED; + if (this->object_->is_locked()) + return IS_LOCKED; + return IS_RUNNABLE; } @@ -166,6 +185,14 @@ Relocate_task::run(Workqueue*) this->of_); } +// Return a debugging name for the task. + +std::string +Relocate_task::get_name() const +{ + return "Relocate_task " + this->object_->name(); +} + // Read the relocs and local symbols from the object file and store // the information in RD. -- cgit v1.1