2014-07-07 03:15:40 +00:00
|
|
|
// Copyright 2014 Citra Emulator Project
|
2014-12-17 05:38:14 +00:00
|
|
|
// Licensed under GPLv2 or any later version
|
2014-07-07 03:15:40 +00:00
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "common/common_types.h"
|
|
|
|
|
|
|
|
#include "core/hle/kernel/kernel.h"
|
|
|
|
|
|
|
|
// Address arbiters are an underlying kernel synchronization object that can be created/used via
|
|
|
|
// supervisor calls (SVCs). They function as sort of a global lock. Typically, games/other CTR
|
|
|
|
// applications use them as an underlying mechanism to implement thread-safe barriers, events, and
|
2014-11-19 08:49:13 +00:00
|
|
|
// semphores.
|
2014-07-07 03:15:40 +00:00
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Kernel namespace
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
|
|
|
enum class ArbitrationType : u32 {
|
|
|
|
Signal,
|
|
|
|
WaitIfLessThan,
|
|
|
|
DecrementAndWaitIfLessThan,
|
|
|
|
WaitIfLessThanWithTimeout,
|
|
|
|
DecrementAndWaitIfLessThanWithTimeout,
|
|
|
|
};
|
|
|
|
|
2015-01-13 19:49:26 +00:00
|
|
|
ResultCode ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s32 value, u64 nanoseconds);
|
2014-07-07 03:15:40 +00:00
|
|
|
|
|
|
|
Handle CreateAddressArbiter(const std::string& name = "Unknown");
|
|
|
|
|
|
|
|
} // namespace FileSys
|