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:
parent
38a90882a4
commit
e6a7723f2f
17 changed files with 56 additions and 68 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue