Merge pull request #3096 from Subv/arbitrateaddress

Kernel/Arbiters: When doing ArbitrateAddress(Signal), always pick the highest priority thread, using the first one that was put to sleep if more than one thread with the same highest priority exists.
This commit is contained in:
Sebastian Valle 2017-11-15 09:16:16 -05:00 committed by GitHub
commit f0027e9996
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 82 additions and 64 deletions

View file

@ -629,7 +629,8 @@ static ResultCode ArbitrateAddress(Kernel::Handle handle, u32 address, u32 type,
if (arbiter == nullptr)
return ERR_INVALID_HANDLE;
auto res = arbiter->ArbitrateAddress(static_cast<Kernel::ArbitrationType>(type), address, value,
auto res = arbiter->ArbitrateAddress(Kernel::GetCurrentThread(),
static_cast<Kernel::ArbitrationType>(type), address, value,
nanoseconds);
// TODO(Subv): Identify in which specific cases this call should cause a reschedule.