mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-28 22:36:26 -05:00
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
|
// Copyright 2014 Citra Emulator Project
|
||
|
// Licensed under GPLv2
|
||
|
// 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
|
||
|
// semphores.
|
||
|
|
||
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||
|
// Kernel namespace
|
||
|
|
||
|
namespace Kernel {
|
||
|
|
||
|
/// Address arbitration types
|
||
|
enum class ArbitrationType : u32 {
|
||
|
Signal,
|
||
|
WaitIfLessThan,
|
||
|
DecrementAndWaitIfLessThan,
|
||
|
WaitIfLessThanWithTimeout,
|
||
|
DecrementAndWaitIfLessThanWithTimeout,
|
||
|
};
|
||
|
|
||
|
/// Arbitrate an address
|
||
|
Result ArbitrateAddress(Handle handle, ArbitrationType type, u32 address, s32 value);
|
||
|
|
||
|
/// Create an address arbiter
|
||
|
Handle CreateAddressArbiter(const std::string& name = "Unknown");
|
||
|
|
||
|
} // namespace FileSys
|