Kernel: Centralize error definitions in errors.h

This commit is contained in:
Yuri Kunde Schlesner 2017-05-21 00:11:36 -07:00
parent 743d18f0e4
commit 2cdb40d709
23 changed files with 178 additions and 132 deletions

View file

@ -5,6 +5,7 @@
#pragma once
#include "common/common_types.h"
#include "core/hle/kernel/errors.h"
#include "core/hle/kernel/thread.h"
#include "core/memory.h"
@ -43,6 +44,12 @@ inline u32* GetStaticBuffers(const int offset = 0) {
namespace IPC {
// These errors are commonly returned by invalid IPC translations, so alias them here for
// convenience.
// TODO(yuriks): These will probably go away once translation is implemented inside the kernel.
using Kernel::ERR_INVALID_BUFFER_DESCRIPTOR;
constexpr auto ERR_INVALID_HANDLE = Kernel::ERR_INVALID_HANDLE_OS;
enum DescriptorType : u32 {
// Buffer related desciptors types (mask : 0x0F)
StaticBuffer = 0x02,