]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blobdiff - gold/token.h
gold: Properly remove the versioned symbol
[thirdparty/binutils-gdb.git] / gold / token.h
index 49a7d51ac75c9b842b557d526052b38bdc720af3..0071a3a326c9d4aeb9b85d7f910e9c5bb57c5609 100644 (file)
@@ -1,6 +1,6 @@
 // token.h -- lock tokens for gold   -*- C++ -*-
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2006-2024 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // This file is part of gold.
@@ -48,6 +48,10 @@ class Task_list
   empty() const
   { return this->head_ == NULL; }
 
+  // Add T to the head of the list.
+  void
+  push_front(Task* t);
+
   // Add T to the end of the list.
   void
   push_back(Task* t);
@@ -140,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
@@ -166,6 +179,12 @@ class Task_token
   add_waiting(Task* t)
   { this->waiting_.push_back(t); }
 
+  // Add T to the front of the list of tasks waiting for this token to
+  // be released.
+  void
+  add_waiting_front(Task* t)
+  { this->waiting_.push_front(t); }
+
   // Remove the first Task waiting for this token to be released, and
   // return it.  Return NULL if no Tasks are waiting.
   Task*