OpenCores
URL https://opencores.org/ocsvn/open8_urisc/open8_urisc/trunk

Subversion Repositories open8_urisc

[/] [open8_urisc/] [trunk/] [gnu/] [binutils/] [gold/] [workqueue.cc] - Diff between revs 27 and 159

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 27 Rev 159
Line 108... Line 108...
  void
  void
  set_thread_count(int thread_count)
  set_thread_count(int thread_count)
  { gold_assert(thread_count > 0); }
  { gold_assert(thread_count > 0); }
 
 
  bool
  bool
  should_cancel_thread()
  should_cancel_thread(int)
  { return false; }
  { return false; }
};
};
 
 
// Workqueue methods.
// Workqueue methods.
 
 
Line 200... Line 200...
}
}
 
 
// Return whether to cancel the current thread.
// Return whether to cancel the current thread.
 
 
inline bool
inline bool
Workqueue::should_cancel_thread()
Workqueue::should_cancel_thread(int thread_number)
{
{
  return this->threader_->should_cancel_thread();
  return this->threader_->should_cancel_thread(thread_number);
}
}
 
 
// Find a runnable task in TASKS.  Return NULL if none could be found.
// Find a runnable task in TASKS.  Return NULL if none could be found.
// If we find a Task waiting for a Token, add it to the list for that
// If we find a Task waiting for a Token, add it to the list for that
// Token.  The workqueue lock must be held when this is called.
// Token.  The workqueue lock must be held when this is called.
Line 262... Line 262...
 
 
          gold_assert(this->waiting_ == 0);
          gold_assert(this->waiting_ == 0);
          return NULL;
          return NULL;
        }
        }
 
 
      if (this->should_cancel_thread())
      if (this->should_cancel_thread(thread_number))
        return NULL;
        return NULL;
 
 
      gold_debug(DEBUG_TASK, "%3d sleeping", thread_number);
      gold_debug(DEBUG_TASK, "%3d sleeping", thread_number);
 
 
      this->condvar_.wait();
      this->condvar_.wait();

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.