summaryrefslogblamecommitdiffstats
path: root/src/core/hle/kernel/svc_common.h
blob: 8a8f347b585b65c85ea736a0da267ee9c9cd400a (plain) (tree)
1
2
3
4
5
6
7
8







                                            



                   

                       
                                            

                                       










                                                                                           
                          
// Copyright 2020 yuzu emulator team
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include "common/common_types.h"

namespace Kernel {
using Handle = u32;
}

namespace Kernel::Svc {

constexpr s32 ArgumentHandleCountMax = 0x40;
constexpr u32 HandleWaitMask{1u << 30};

constexpr inline Handle InvalidHandle = Handle(0);

enum PseudoHandle : Handle {
    CurrentThread = 0xFFFF8000,
    CurrentProcess = 0xFFFF8001,
};

constexpr bool IsPseudoHandle(const Handle& handle) {
    return handle == PseudoHandle::CurrentProcess || handle == PseudoHandle::CurrentThread;
}

} // namespace Kernel::Svc