diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-09-30 13:25:53 +0100 |
---|---|---|
committer | Georgios Pinitas <georgios.pinitas@arm.com> | 2019-09-30 14:13:55 +0000 |
commit | 879d1313ba69d9ced8424f54ffeea6a3c60496f0 (patch) | |
tree | 6e6f4be4b9ec992a019aa4d079c844a9649ef8ed /src/runtime | |
parent | ea80348ef330bd6415ec6dae45b99873710f812a (diff) | |
download | ComputeLibrary-879d1313ba69d9ced8424f54ffeea6a3c60496f0.tar.gz |
COMPMID-2452: Fix compilation issues on armclang
Change-Id: I41bd60760270a2c7d83e391fd9430b4513ab00bc
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com>
Reviewed-on: https://review.mlplatform.org/c/2002
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Reviewed-by: Michele Di Giorgio <michele.digiorgio@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime')
-rw-r--r-- | src/runtime/CPUUtils.cpp | 5 | ||||
-rw-r--r-- | src/runtime/PoolManager.cpp | 14 |
2 files changed, 7 insertions, 12 deletions
diff --git a/src/runtime/CPUUtils.cpp b/src/runtime/CPUUtils.cpp index f7240db99e..5860720d3b 100644 --- a/src/runtime/CPUUtils.cpp +++ b/src/runtime/CPUUtils.cpp @@ -30,13 +30,8 @@ #include <array> #include <cstdlib> #include <cstring> -#include <fcntl.h> #include <fstream> #include <map> -#include <sched.h> -#include <sys/stat.h> -#include <sys/types.h> -#include <unistd.h> #ifndef BARE_METAL /* C++ std::regex takes up a lot of space in the standalone builds */ diff --git a/src/runtime/PoolManager.cpp b/src/runtime/PoolManager.cpp index 5ec2ce92c1..c865c0ca27 100644 --- a/src/runtime/PoolManager.cpp +++ b/src/runtime/PoolManager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017-2018 ARM Limited. + * Copyright (c) 2017-2019 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -41,7 +41,7 @@ IMemoryPool *PoolManager::lock_pool() ARM_COMPUTE_ERROR_ON_MSG(_free_pools.empty() && _occupied_pools.empty(), "Haven't setup any pools!"); _sem->wait(); - std::lock_guard<arm_compute::Mutex> lock(_mtx); + arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx); ARM_COMPUTE_ERROR_ON_MSG(_free_pools.empty(), "Empty pool must exist as semaphore has been signalled"); _occupied_pools.splice(std::begin(_occupied_pools), _free_pools, std::begin(_free_pools)); return _occupied_pools.front().get(); @@ -51,7 +51,7 @@ void PoolManager::unlock_pool(IMemoryPool *pool) { ARM_COMPUTE_ERROR_ON_MSG(_free_pools.empty() && _occupied_pools.empty(), "Haven't setup any pools!"); - std::lock_guard<arm_compute::Mutex> lock(_mtx); + arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx); auto it = std::find_if(std::begin(_occupied_pools), std::end(_occupied_pools), [pool](const std::unique_ptr<IMemoryPool> &pool_it) { return pool_it.get() == pool; @@ -63,7 +63,7 @@ void PoolManager::unlock_pool(IMemoryPool *pool) void PoolManager::register_pool(std::unique_ptr<IMemoryPool> pool) { - std::lock_guard<arm_compute::Mutex> lock(_mtx); + arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx); ARM_COMPUTE_ERROR_ON_MSG(!_occupied_pools.empty(), "All pools should be free in order to register a new one!"); // Set pool @@ -75,7 +75,7 @@ void PoolManager::register_pool(std::unique_ptr<IMemoryPool> pool) std::unique_ptr<IMemoryPool> PoolManager::release_pool() { - std::lock_guard<arm_compute::Mutex> lock(_mtx); + arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx); ARM_COMPUTE_ERROR_ON_MSG(!_occupied_pools.empty(), "All pools should be free in order to release one!"); if(!_free_pools.empty()) @@ -95,7 +95,7 @@ std::unique_ptr<IMemoryPool> PoolManager::release_pool() void PoolManager::clear_pools() { - std::lock_guard<arm_compute::Mutex> lock(_mtx); + arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx); ARM_COMPUTE_ERROR_ON_MSG(!_occupied_pools.empty(), "All pools should be free in order to clear the PoolManager!"); _free_pools.clear(); @@ -105,7 +105,7 @@ void PoolManager::clear_pools() size_t PoolManager::num_pools() const { - std::lock_guard<arm_compute::Mutex> lock(_mtx); + arm_compute::lock_guard<arm_compute::Mutex> lock(_mtx); return _free_pools.size() + _occupied_pools.size(); }
\ No newline at end of file |