Automatic date update in version.in
[platform/upstream/binutils.git] / gold / token.h
index d477be1..47091cb 100644 (file)
@@ -1,6 +1,6 @@
 // token.h -- lock tokens for gold   -*- C++ -*-
 
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright (C) 2006-2014 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -91,8 +91,8 @@ class Task_list
 class Task_token
 {
  public:
-  Task_token(bool tis_blocker)
-    : is_blocker_(tis_blocker), blockers_(0), writer_(NULL), waiting_()
+  Task_token(bool is_blocker)
+    : is_blocker_(is_blocker), blockers_(0), writer_(NULL), waiting_()
   { }
 
   ~Task_token()
@@ -144,6 +144,15 @@ class Task_token
     this->writer_ = NULL;
   }
 
+  // Add some number of blockers to the token.
+  void
+  add_blockers(int c)
+  {
+    gold_assert(this->is_blocker_);
+    this->blockers_ += c;
+    this->writer_ = NULL;
+  }
+
   // Remove a blocker from the token.  Returns true if block count
   // drops to zero.
   bool