diff options
author | Rob Hughes <robert.hughes@arm.com> | 2020-01-07 17:05:24 +0000 |
---|---|---|
committer | Rob Hughes <robert.hughes@arm.com> | 2020-01-21 16:01:58 +0000 |
commit | bdee4267583a7daaf9ea5284d2ff6d4bbb782229 (patch) | |
tree | f61b4fd91777509fc8d55a23fd25af5e8f15ceb8 /src/profiling/SendCounterPacket.cpp | |
parent | 25b7436b02514145a0289daff78f5b9f64cdd0db (diff) | |
download | armnn-bdee4267583a7daaf9ea5284d2ff6d4bbb782229.tar.gz |
Add thin abstraction layer for processes and filesystem
This is used instead of some hardcoded Unix calls and means this code
now works on Windows
(This is a rework of a previous patch which used boost, now that I have
been informed that we are trying to move towards removing boost).
Change-Id: Ib0d11055279bbd7b710f086e9890369e3ecbfe9a
Signed-off-by: Robert Hughes <robert.hughes@arm.com>
Diffstat (limited to 'src/profiling/SendCounterPacket.cpp')
-rw-r--r-- | src/profiling/SendCounterPacket.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/profiling/SendCounterPacket.cpp b/src/profiling/SendCounterPacket.cpp index 5128331c46..4d305af951 100644 --- a/src/profiling/SendCounterPacket.cpp +++ b/src/profiling/SendCounterPacket.cpp @@ -9,6 +9,7 @@ #include <armnn/Exceptions.hpp> #include <armnn/Conversion.hpp> +#include <Processes.hpp> #include <boost/format.hpp> #include <boost/numeric/conversion/cast.hpp> @@ -90,7 +91,8 @@ void SendCounterPacket::SendStreamMetaDataPacket() offset += sizeUint32; WriteUint32(writeBuffer, offset, MAX_METADATA_PACKET_LENGTH); // max_data_length offset += sizeUint32; - WriteUint32(writeBuffer, offset, numeric_cast<uint32_t>(getpid())); // pid + int pid = armnnUtils::Processes::GetCurrentId(); + WriteUint32(writeBuffer, offset, numeric_cast<uint32_t>(pid)); // pid offset += sizeUint32; uint32_t poolOffset = bodySize; WriteUint32(writeBuffer, offset, infoSize ? poolOffset : 0); // offset_info |