aboutsummaryrefslogtreecommitdiff
path: root/gold/descriptors.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gold/descriptors.cc')
-rw-r--r--gold/descriptors.cc24
1 files changed, 2 insertions, 22 deletions
diff --git a/gold/descriptors.cc b/gold/descriptors.cc
index 73c03bf..18498ef 100644
--- a/gold/descriptors.cc
+++ b/gold/descriptors.cc
@@ -1,6 +1,6 @@
// descriptors.cc -- manage file descriptors for gold
-// Copyright 2008 Free Software Foundation, Inc.
+// Copyright 2008, 2009 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
@@ -115,9 +115,7 @@ Descriptors::open(int descriptor, const char* name, int flags, int mode)
pod->inuse = true;
pod->is_write = (flags & O_ACCMODE) != O_RDONLY;
- if (!pod->is_claimed)
- ++this->current_;
- pod->is_claimed = false;
+ ++this->current_;
if (this->current_ >= this->limit_)
this->close_some_descriptor();
@@ -168,24 +166,6 @@ Descriptors::release(int descriptor, bool permanent)
}
}
-// Claim the file descriptor DESCRIPTOR for a plugin. This effectively
-// removes the descriptor from the pool of linker-managed descriptors,
-// as the plugin will assume responsibility for closing it.
-// The IS_CLAIMED flag allows us to recognize when a file descriptor
-// has been reused after being closed by the plugin.
-
-void
-Descriptors::claim_for_plugin(int descriptor)
-{
- Hold_lock hl(*this->lock_);
-
- gold_assert(descriptor >= 0
- && (static_cast<size_t>(descriptor)
- < this->open_descriptors_.size()));
- Open_descriptor* pod = &this->open_descriptors_[descriptor];
- pod->is_claimed = true;
-}
-
// Close some descriptor. The lock is held when this is called. We
// close the descriptor on the top of the free stack. Note that this
// is the opposite of an LRU algorithm--we close the most recently