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

37 lines
808 B
C
Raw Normal View History

2022-04-23 22:49:07 +04:00
// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
2020-12-31 11:31:47 +04:00
#pragma once
#include "common/common_types.h"
2021-12-29 03:15:49 +04:00
#include "common/literals.h"
2020-12-31 11:31:47 +04:00
2021-05-06 06:45:54 +04:00
namespace Kernel {
using Handle = u32;
}
2020-12-31 11:31:47 +04:00
namespace Kernel::Svc {
2021-12-29 03:15:49 +04:00
using namespace Common::Literals;
2022-10-20 02:52:26 +04:00
constexpr inline s32 ArgumentHandleCountMax = 0x40;
constexpr inline u32 HandleWaitMask = 1u << 30;
constexpr inline s64 WaitInfinite = -1;
2020-12-31 11:31:47 +04:00
2021-12-29 03:15:49 +04:00
constexpr inline std::size_t HeapSizeAlignment = 2_MiB;
2021-05-06 06:45:54 +04:00
constexpr inline Handle InvalidHandle = Handle(0);
enum PseudoHandle : Handle {
CurrentThread = 0xFFFF8000,
CurrentProcess = 0xFFFF8001,
};
constexpr bool IsPseudoHandle(Handle handle) {
return handle == PseudoHandle::CurrentProcess || handle == PseudoHandle::CurrentThread;
}
2020-12-31 11:31:47 +04:00
} // namespace Kernel::Svc