X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=gold%2Fworkqueue.h;h=2047620d4b8e37d621d0de127f9a42ae8fb2b7e3;hb=abdb711e0855f0597a96db0486b598144b788212;hp=7c87d15adb3fe44f04e5ff44059d2d559326ddc9;hpb=da769d5629564b82d4eec1b256ffc562d5c01624;p=deliverable%2Fbinutils-gdb.git diff --git a/gold/workqueue.h b/gold/workqueue.h index 7c87d15adb..2047620d4b 100644 --- a/gold/workqueue.h +++ b/gold/workqueue.h @@ -1,6 +1,6 @@ // workqueue.h -- the work queue for gold -*- C++ -*- -// Copyright 2006, 2007 Free Software Foundation, Inc. +// Copyright (C) 2006-2019 Free Software Foundation, Inc. // Written by Ian Lance Taylor . // This file is part of gold. @@ -152,7 +152,7 @@ class Task_function : public Task Task_function(Task_function_runner* runner, Task_token* blocker, const char* name) : runner_(runner), blocker_(blocker), name_(name) - { } + { gold_assert(blocker != NULL); } ~Task_function() { @@ -227,6 +227,12 @@ class Workqueue 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&); @@ -262,7 +268,7 @@ class 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.