2019-12-09 11:57:37 +00:00
|
|
|
/*
|
2021-10-04 19:59:10 +00:00
|
|
|
* Copyright (c) Atmosphère-NX
|
2019-12-09 11:57:37 +00: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 19:33:09 +00:00
|
|
|
#include "impl/os_process_handle_impl.hpp"
|
2019-12-09 11:57:37 +00:00
|
|
|
|
|
|
|
namespace ams {
|
|
|
|
|
2021-10-04 19:33:09 +00:00
|
|
|
namespace dd {
|
2019-12-09 11:57:37 +00:00
|
|
|
|
2021-10-04 19:33:09 +00:00
|
|
|
dd::ProcessHandle __attribute__((const)) GetCurrentProcessHandle() {
|
|
|
|
return ::ams::os::impl::ProcessHandleImpl::GetCurrentProcessHandle();
|
2019-12-09 11:57:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
namespace os {
|
|
|
|
|
2021-10-04 19:33:09 +00:00
|
|
|
NativeHandle __attribute__((const)) GetCurrentProcessHandle() {
|
|
|
|
return ::ams::os::impl::ProcessHandleImpl::GetCurrentProcessHandle();
|
2019-12-09 11:57:37 +00:00
|
|
|
}
|
|
|
|
|
2021-10-04 19:33:09 +00:00
|
|
|
Result GetProcessId(os::ProcessId *out, NativeHandle handle) {
|
2022-03-26 21:48:33 +00:00
|
|
|
R_RETURN(::ams::os::impl::ProcessHandleImpl::GetProcessId(out, handle));
|
2021-10-04 19:33:09 +00:00
|
|
|
}
|
2019-12-09 11:57:37 +00:00
|
|
|
|
2021-10-04 19:33:09 +00:00
|
|
|
Result GetProgramId(ncm::ProgramId *out, NativeHandle handle) {
|
2022-03-26 21:48:33 +00:00
|
|
|
R_RETURN(::ams::os::impl::ProcessHandleImpl::GetProgramId(out, handle));
|
2019-12-09 11:57:37 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|