blob: 94e809529a516b6c259aef66ec4bab4136e25943 (
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
|
//
// 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(__unix__) || defined(__APPLE__)
return getpid();
#elif defined(_MSC_VER)
return ::GetCurrentProcessId();
#endif
}
} // namespace pipe
} // namespace arm
|