// workqueue.h -- the work queue for gold -*- C++ -*-
-// Copyright 2006, 2007, 2008 Free Software Foundation, Inc.
+// Copyright (C) 2006-2020 Free Software Foundation, Inc.
// This file is part of gold.
Task_function(Task_function_runner* runner, Task_token* blocker,
const char* name)
: runner_(runner), blocker_(blocker), name_(name)
- { }
+ { gold_assert(blocker != NULL); }
~Task_function()
{
void
set_thread_count(int);
+ // Add a new blocker to an existing Task_token. This must be done
+ // with the workqueue lock held. This should not be done routinely,
+ // only in special circumstances.
+ void
+ add_blocker(Task_token*);
+
private:
// This class can not be copied.
Workqueue(const Workqueue&);
// Return whether to cancel this thread.
bool
- should_cancel_thread();
+ should_cancel_thread(int thread_number);
// Master Workqueue lock. This controls access to the following
// member variables.