yuzu/src/core/hle/kernel/svc_common.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
808 B
C++
Raw Normal View History

// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "common/common_types.h"
#include "common/literals.h"
2021-04-24 11:40:31 +02:00
namespace Kernel {
using Handle = u32;
}
namespace Kernel::Svc {
using namespace Common::Literals;
constexpr inline s32 ArgumentHandleCountMax = 0x40;
constexpr inline u32 HandleWaitMask = 1u << 30;
constexpr inline s64 WaitInfinite = -1;
constexpr inline std::size_t HeapSizeAlignment = 2_MiB;
2021-04-24 11:40:31 +02:00
constexpr inline Handle InvalidHandle = Handle(0);
enum PseudoHandle : Handle {
CurrentThread = 0xFFFF8000,
CurrentProcess = 0xFFFF8001,
};
constexpr bool IsPseudoHandle(Handle handle) {
2021-04-24 11:40:31 +02:00
return handle == PseudoHandle::CurrentProcess || handle == PseudoHandle::CurrentThread;
}
} // namespace Kernel::Svc