2019-12-09 12:57:37 +01:00
|
|
|
/*
|
2020-01-24 11:10:40 +01:00
|
|
|
* Copyright (c) 2018-2020 Atmosphère-NX
|
2019-12-09 12:57:37 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms and conditions of the GNU General Public License,
|
|
|
|
* version 2, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#include <stratosphere.hpp>
|
2021-10-04 21:33:09 +02:00
|
|
|
#include "impl/os_process_handle_impl.hpp"
|
2019-12-09 12:57:37 +01:00
|
|
|
|
|
|
|
namespace ams {
|
|
|
|
|
2021-10-04 21:33:09 +02:00
|
|
|
namespace dd {
|
2019-12-09 12:57:37 +01:00
|
|
|
|
2021-10-04 21:33:09 +02:00
|
|
|
dd::ProcessHandle __attribute__((const)) GetCurrentProcessHandle() {
|
|
|
|
return ::ams::os::impl::ProcessHandleImpl::GetCurrentProcessHandle();
|
2019-12-09 12:57:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace os {
|
|
|
|
|
2021-10-04 21:33:09 +02:00
|
|
|
NativeHandle __attribute__((const)) GetCurrentProcessHandle() {
|
|
|
|
return ::ams::os::impl::ProcessHandleImpl::GetCurrentProcessHandle();
|
2019-12-09 12:57:37 +01:00
|
|
|
}
|
|
|
|
|
2021-10-04 21:33:09 +02:00
|
|
|
Result GetProcessId(os::ProcessId *out, NativeHandle handle) {
|
|
|
|
return ::ams::os::impl::ProcessHandleImpl::GetProcessId(out, handle);
|
|
|
|
}
|
2019-12-09 12:57:37 +01:00
|
|
|
|
2021-10-04 21:33:09 +02:00
|
|
|
Result GetProgramId(ncm::ProgramId *out, NativeHandle handle) {
|
|
|
|
return ::ams::os::impl::ProcessHandleImpl::GetProgramId(out, handle);
|
2019-12-09 12:57:37 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|