xaiefal
Loading...
Searching...
No Matches
xaiefal-common.hpp
Go to the documentation of this file.
1// Copyright(C) 2020 - 2021 by Xilinx, Inc. All rights reserved.
2// SPDX-License-Identifier: MIT
3
4#pragma once
5
6namespace xaiefal {
7 #define XAIE_RSC_ID_ANY (-1U)
8 #define XAIE_RSC_TYPE_ANY (-1U)
9 #define XAIE_MOD_ANY (-1U)
10 #define XAIE_LOC_ANY 0xFFU
11}
12
13#ifdef __linux__
14#define __COMPILER_SUPPORTS_LOCKS__
15#endif
16
17#include <fstream>
18#include <functional>
19#ifdef __COMPILER_SUPPORTS_LOCKS__
20#include <mutex>
21#endif
22
23#ifdef __COMPILER_SUPPORTS_LOCKS__
24#define _XAIEFAL_MUTEX_ACQUIRE(L) const std::lock_guard<std::mutex> lock(L)
25#define _XAIEFAL_MUTEX_DECLARE(L) std::mutex L
26#else
27#define _XAIEFAL_MUTEX_ACQUIRE(...)
28#define _XAIEFAL_MUTEX_DECLARE(...)
29#endif
Definition xaiefal-base.hpp:23