1 /*
2  * Copyright (c) 2021, Arm Limited. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  *
6  */
7 
8 #ifndef __ARRAY_H__
9 #define __ARRAY_H__
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #ifndef ARRAY_SIZE
16 #define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
17 #endif
18 
19 #ifndef IOVEC_LEN
20 #define IOVEC_LEN(x) (uint32_t)ARRAY_SIZE(x)
21 #endif
22 
23 #ifdef __cplusplus
24 }
25 #endif
26 
27 #endif /* __ARRAY_H__ */
28