diff options
Diffstat (limited to 'gold/token.h')
-rw-r--r-- | gold/token.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gold/token.h b/gold/token.h index 49a7d51..6c99441 100644 --- a/gold/token.h +++ b/gold/token.h @@ -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); @@ -166,6 +170,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* |