Kernel: Object ShouldWait and Acquire calls now take a thread as a parameter.

This will be useful when implementing mutex priority inheritance.
This commit is contained in:
Subv 2017-01-01 16:53:22 -05:00
parent 38a90882a4
commit e6a7723f2f
17 changed files with 56 additions and 68 deletions

View file

@ -132,13 +132,14 @@ using SharedPtr = boost::intrusive_ptr<T>;
class WaitObject : public Object {
public:
/**
* Check if the current thread should wait until the object is available
* Check if the specified thread should wait until the object is available
* @param thread The thread about which we're deciding.
* @return True if the current thread should wait due to this object being unavailable
*/
virtual bool ShouldWait() = 0;
virtual bool ShouldWait(Thread* thread) const = 0;
/// Acquire/lock the object if it is available
virtual void Acquire() = 0;
/// Acquire/lock the object for the specified thread if it is available
virtual void Acquire(Thread* thread) = 0;
/**
* Add a thread to wait on this object