// token.h -- lock tokens for gold -*- C++ -*-
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
// Written by Ian Lance Taylor <iant@google.com>.
// This file is part of gold.
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);
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*