blob: 8b401d41457b7fb49177a831f27b2acf2e3e38a2 [file] [log] [blame]
Laurent Carlier749294b2020-06-01 09:03:17 +01001//
Jim Flynn6da6a452020-07-14 14:26:27 +01002// Copyright © 2020 Arm Ltd and Contributors. All rights reserved.
Rob Hughesbdee4262020-01-07 17:05:24 +00003// SPDX-License-Identifier: MIT
4//
5
6#include "Processes.hpp"
7
Jim Flynn6da6a452020-07-14 14:26:27 +01008#if defined(__unix__) || defined(__APPLE__)
Rob Hughesbdee4262020-01-07 17:05:24 +00009#include <unistd.h>
10#elif defined(_MSC_VER)
Rob Hughes35c31c02020-08-17 15:47:20 +010011#include <common/include/WindowsWrapper.hpp>
Rob Hughesbdee4262020-01-07 17:05:24 +000012#endif
13
14namespace armnnUtils
15{
16namespace Processes
17{
18
19int GetCurrentId()
20{
Jim Flynn6da6a452020-07-14 14:26:27 +010021#if defined(__unix__) || defined(__APPLE__)
Rob Hughesbdee4262020-01-07 17:05:24 +000022 return getpid();
23#elif defined(_MSC_VER)
24 return ::GetCurrentProcessId();
25#endif
26}
27
28}
29}