gdb: add target_ops::supports_displaced_step
[deliverable/binutils-gdb.git] / gold / workqueue.h
index 5f2137e46acd0d7a961c7e527772a016999a38a2..96ceb4c58df47c92e7934a280c734eba27ac4b2b 100644 (file)
@@ -1,6 +1,6 @@
 // workqueue.h -- the work queue for gold   -*- C++ -*-
 
-// Copyright 2006, 2007 Free Software Foundation, Inc.
+// Copyright (C) 2006-2020 Free Software Foundation, Inc.
 // Written by Ian Lance Taylor <iant@google.com>.
 
 // 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()
   {
@@ -205,10 +205,16 @@ class Workqueue
   void
   queue(Task*);
 
-  // Add a new task to the front of the work queue.  It will be the
-  // next task to run if it is ready.
+  // Add a new task to the work queue which should run soon.  If the
+  // task is ready, it will be run before any tasks added using
+  // queue().
+  void
+  queue_soon(Task*);
+
+  // Add a new task to the work queue which should run next if it is
+  // ready.
   void
-  queue_front(Task*);
+  queue_next(Task*);
 
   // Process all the tasks on the work queue.  This function runs
   // until all tasks have completed.  The argument is the thread
@@ -221,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&);
@@ -228,7 +240,7 @@ class Workqueue
 
   // Add a task to a queue.
   void
-  add_to_queue(Task_list* queue, Task* t);
+  add_to_queue(Task_list* queue, Task* t, bool front);
 
   // Find a runnable task, or wait for one.
   Task*
@@ -256,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.
This page took 0.024122 seconds and 4 git commands to generate.