7 changed files with 147 additions and 9 deletions
-
46src/core/hle/kernel/address_arbiter.cpp
-
32src/core/hle/kernel/address_arbiter.h
-
10src/core/hle/kernel/errors.h
-
4src/core/hle/kernel/mutex.cpp
-
53src/core/hle/kernel/svc.cpp
-
10src/core/hle/kernel/svc_wrap.h
-
1src/core/hle/kernel/thread.h
@ -0,0 +1,46 @@ |
|||||
|
// Copyright 2018 yuzu emulator team
|
||||
|
// Licensed under GPLv2 or any later version
|
||||
|
// Refer to the license.txt file included.
|
||||
|
|
||||
|
#include "common/assert.h"
|
||||
|
#include "common/common_funcs.h"
|
||||
|
#include "common/common_types.h"
|
||||
|
#include "core/hle/kernel/kernel.h"
|
||||
|
#include "core/hle/kernel/process.h"
|
||||
|
#include "core/hle/kernel/thread.h"
|
||||
|
#include "core/memory.h"
|
||||
|
|
||||
|
namespace Kernel { |
||||
|
namespace AddressArbiter { |
||||
|
|
||||
|
// Signals an address being waited on.
|
||||
|
ResultCode SignalToAddress(VAddr address, s32 value, s32 num_to_wake) { |
||||
|
// TODO
|
||||
|
return RESULT_SUCCESS; |
||||
|
} |
||||
|
|
||||
|
// Signals an address being waited on and increments its value if equal to the value argument.
|
||||
|
ResultCode IncrementAndSignalToAddressIfEqual(VAddr address, s32 value, s32 num_to_wake) { |
||||
|
// TODO
|
||||
|
return RESULT_SUCCESS; |
||||
|
} |
||||
|
|
||||
|
// Signals an address being waited on and modifies its value based on waiting thread count if equal to the value argument.
|
||||
|
ResultCode ModifyByWaitingCountAndSignalToAddressIfEqual(VAddr address, s32 value, s32 num_to_wake) { |
||||
|
// TODO
|
||||
|
return RESULT_SUCCESS; |
||||
|
} |
||||
|
|
||||
|
// Waits on an address if the value passed is less than the argument value, optionally decrementing.
|
||||
|
ResultCode WaitForAddressIfLessThan(VAddr address, s32 value, s64 timeout, bool should_decrement) { |
||||
|
// TODO
|
||||
|
return RESULT_SUCCESS; |
||||
|
} |
||||
|
|
||||
|
// Waits on an address if the value passed is equal to the argument value.
|
||||
|
ResultCode WaitForAddressIfEqual(VAddr address, s32 value, s64 timeout) { |
||||
|
// TODO
|
||||
|
return RESULT_SUCCESS; |
||||
|
} |
||||
|
} // namespace AddressArbiter
|
||||
|
} // namespace Kernel
|
||||
@ -0,0 +1,32 @@ |
|||||
|
// Copyright 2018 yuzu emulator team |
||||
|
// Licensed under GPLv2 or any later version |
||||
|
// Refer to the license.txt file included. |
||||
|
|
||||
|
#pragma once |
||||
|
|
||||
|
#include "core/hle/result.h" |
||||
|
|
||||
|
namespace Kernel { |
||||
|
|
||||
|
namespace AddressArbiter { |
||||
|
enum class ArbitrationType { |
||||
|
WaitIfLessThan = 0, |
||||
|
DecrementAndWaitIfLessThan = 1, |
||||
|
WaitIfEqual = 2, |
||||
|
}; |
||||
|
|
||||
|
enum class SignalType { |
||||
|
Signal = 0, |
||||
|
IncrementAndSignalIfEqual = 1, |
||||
|
ModifyByWaitingCountAndSignalIfEqual = 2, |
||||
|
}; |
||||
|
|
||||
|
ResultCode SignalToAddress(VAddr address, s32 value, 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); |
||||
|
} // namespace AddressArbiter |
||||
|
|
||||
|
} // namespace Kernel |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue