blob: b8c2941e5a3e05728e137d892f27ed2586b94a86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
//
// 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
|