aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-dpdk/include/odp/api/std_clib.h
blob: 278f708f17a8b42011d54b4919b11c1d43de2683 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/* Copyright (c) 2015, Linaro Limited
 * All rights reserved.
 *
 * SPDX-License-Identifier:     BSD-3-Clause
 */

#ifndef ODP_PLAT_STD_CLIB_H_
#define ODP_PLAT_STD_CLIB_H_

#ifdef __cplusplus
extern "C" {
#endif

#include <odp/api/spec/std_types.h>
#include <string.h>

extern void* (*const dpdk_memcpy)(void*, const void*, size_t);

static inline void *odp_memcpy(void *dst, const void *src, size_t num)
{
	return (*dpdk_memcpy)(dst, src, num);
}

static inline void *odp_memset(void *ptr, int value, size_t num)
{
	return memset(ptr, value, num);
}

static inline int odp_memcmp(const void *ptr1, const void *ptr2, size_t num)
{
	return memcmp(ptr1, ptr2, num);
}

#ifdef __cplusplus
}
#endif

#endif