diff options
author | bunnei <bunneidev@gmail.com> | 2014-07-07 05:15:40 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-07-09 00:46:38 +0200 |
commit | 3eb89f3e98b118f7829d3e56f32bcacbe58afc46 (patch) | |
tree | a4e8761b1b55ca53941db9f2ce8c04f224226238 /src/core/hle/kernel/address_arbiter.h | |
parent | Thread: Added functions to resume threads from address arbitration. (diff) | |
download | yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.gz yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.bz2 yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.lz yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.xz yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.tar.zst yuzu-3eb89f3e98b118f7829d3e56f32bcacbe58afc46.zip |
Diffstat (limited to 'src/core/hle/kernel/address_arbiter.h')
-rw-r--r-- | src/core/hle/kernel/address_arbiter.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/core/hle/kernel/address_arbiter.h b/src/core/hle/kernel/address_arbiter.h new file mode 100644 index 000000000..a483fe466 --- /dev/null +++ b/src/core/hle/kernel/address_arbiter.h @@ -0,0 +1,36 @@ +// 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 |