1.change inline usage in code and mvec in makefile to adapt to GCC version
[o-du/phy.git] / fapi_5g / source / include / nr5g_fapi_memory.h
1 /******************************************************************************
2 *
3 *   Copyright (c) 2019 Intel.
4 *
5 *   Licensed under the Apache License, Version 2.0 (the "License");
6 *   you may not use this file except in compliance with the License.
7 *   You may obtain a copy of the License at
8 *
9 *       http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *   Unless required by applicable law or agreed to in writing, software
12 *   distributed under the License is distributed on an "AS IS" BASIS,
13 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *   See the License for the specific language governing permissions and
15 *   limitations under the License.
16 *
17 *******************************************************************************/
18
19 /**
20  * @file This file consist of fapi memory macro.
21  *
22  **/
23
24 #ifndef NR5G_FAPI_MEM_H_
25 #define NR5G_FAPI_MEM_H_
26
27 #define NR5G_FAPI_MEMCPY(d, x, s, n) nr5g_fapi_memcpy_bound_check(d, x, s, n)
28 #define NR5G_FAPI_MEMSET(s, x, c, n) nr5g_fapi_memset_bound_check(s, x, c, n)
29 #define NR5G_FAPI_STRCPY(d, x, s, n) nr5g_fapi_strcpy_bound_check(d, x, s, n)
30
31 uint8_t nr5g_fapi_memcpy_bound_check(
32     void *d,
33     size_t x,
34     const void *s,
35     size_t n);
36 uint8_t nr5g_fapi_memset_bound_check(
37     void *s,
38     size_t x,
39     const int32_t c,
40     size_t n);
41 uint8_t nr5g_fapi_strcpy_bound_check(
42     char *d,
43     size_t x,
44     const char *s,
45     size_t n);
46
47 #endif                          // NR5G_FAPI_MEM_H_