aboutsummaryrefslogtreecommitdiff
path: root/gold/dirsearch.h
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2007-12-14 19:00:21 +0000
committerIan Lance Taylor <iant@google.com>2007-12-14 19:00:21 +0000
commit17a1d0a9b26ce8f4f71073c41483baa0c10ed83b (patch)
tree3cdd95751145e2cf1cbcaedee2df8790c86b935d /gold/dirsearch.h
parent7004837e8d2e02ee35c50d236681e9c30a283619 (diff)
downloadgdb-17a1d0a9b26ce8f4f71073c41483baa0c10ed83b.zip
gdb-17a1d0a9b26ce8f4f71073c41483baa0c10ed83b.tar.gz
gdb-17a1d0a9b26ce8f4f71073c41483baa0c10ed83b.tar.bz2
Rewrite workqueue. This version eliminates the master thread, and
reduces the amount of locking required to find a new thread to run.
Diffstat (limited to 'gold/dirsearch.h')
-rw-r--r--gold/dirsearch.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/gold/dirsearch.h b/gold/dirsearch.h
index c1af843..e590f41 100644
--- a/gold/dirsearch.h
+++ b/gold/dirsearch.h
@@ -26,12 +26,14 @@
#include <string>
#include <list>
-#include "workqueue.h"
+#include "options.h"
+#include "token.h"
namespace gold
{
class General_options;
+class Workqueue;
// A simple interface to manage directories to be searched for
// libraries.
@@ -40,7 +42,7 @@ class Dirsearch
{
public:
Dirsearch()
- : directories_(NULL), token_()
+ : directories_(NULL), token_(true)
{ }
// Set the list of directories to search.
@@ -55,10 +57,10 @@ class Dirsearch
std::string
find(const std::string&, const std::string& n2, bool *is_in_sysroot) const;
- // Return a reference to the blocker token which controls access.
- const Task_token&
- token() const
- { return this->token_; }
+ // Return the blocker token which controls access.
+ Task_token*
+ token()
+ { return &this->token_; }
private:
// We can not copy this class.