2018-06-21 08:49:43 +02:00
|
|
|
// Copyright 2018 yuzu emulator team
|
|
|
|
// Licensed under GPLv2 or any later version
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2018-07-31 14:06:09 +02:00
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
union ResultCode;
|
2018-06-21 08:49:43 +02:00
|
|
|
|
2019-02-16 18:41:28 +01:00
|
|
|
namespace Kernel::AddressArbiter {
|
2018-06-21 08:49:43 +02:00
|
|
|
|
2018-06-22 05:05:34 +02:00
|
|
|
enum class ArbitrationType {
|
|
|
|
WaitIfLessThan = 0,
|
|
|
|
DecrementAndWaitIfLessThan = 1,
|
|
|
|
WaitIfEqual = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
enum class SignalType {
|
|
|
|
Signal = 0,
|
|
|
|
IncrementAndSignalIfEqual = 1,
|
|
|
|
ModifyByWaitingCountAndSignalIfEqual = 2,
|
|
|
|
};
|
|
|
|
|
|
|
|
ResultCode SignalToAddress(VAddr address, s32 num_to_wake);
|
|
|
|
ResultCode IncrementAndSignalToAddressIfEqual(VAddr address, s32 value, s32 num_to_wake);
|
|
|
|
ResultCode ModifyByWaitingCountAndSignalToAddressIfEqual(VAddr address, s32 value, s32 num_to_wake);
|
|
|
|
|
|
|
|
ResultCode WaitForAddressIfLessThan(VAddr address, s32 value, s64 timeout, bool should_decrement);
|
|
|
|
ResultCode WaitForAddressIfEqual(VAddr address, s32 value, s64 timeout);
|
|
|
|
|
2019-02-16 18:41:28 +01:00
|
|
|
} // namespace Kernel::AddressArbiter
|