blob: b8c2941e5a3e05728e137d892f27ed2586b94a86 [file] [log] [blame]
//
// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
#include "Processes.hpp"
#if defined(__unix__) || defined(__APPLE__)
#include <unistd.h>
#elif defined(_MSC_VER)
#include <common/include/WindowsWrapper.hpp>
#endif
namespace arm
{
namespace pipe
{
int GetCurrentProcessId()
{
#if !defined(ARMNN_DISABLE_PROCESSES)
#if defined(__unix__) || defined(__APPLE__)
return getpid();
#elif defined(_MSC_VER)
return ::GetCurrentProcessId();
#endif
#else
return 0;
#endif
}
} // namespace pipe
} // namespace arm