diff options
author | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-12-31 11:15:35 +0300 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-12-31 11:15:35 +0300 |
commit | 4320d76520e1bf352d1aa2a94a3e8ffe74e003d2 (patch) | |
tree | c699d1e969b2f285bf1dd2e2fa7e770d5db49166 /include/odp/api/std_clib.h | |
parent | a0a20997629be7045222980da6e393bca9a9fa37 (diff) | |
parent | 4b22a3a0853b16b785a88a6a709a3a098cdccc2d (diff) |
Merge branch 'next'v1.6.0.0
Diffstat (limited to 'include/odp/api/std_clib.h')
-rw-r--r-- | include/odp/api/std_clib.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/include/odp/api/std_clib.h b/include/odp/api/std_clib.h new file mode 100644 index 000000000..2119ec481 --- /dev/null +++ b/include/odp/api/std_clib.h @@ -0,0 +1,64 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * ODP version of often used C library calls + */ + +#ifndef ODP_API_STD_CLIB_H_ +#define ODP_API_STD_CLIB_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @defgroup odp_std_clib ODP STD CLIB + * @details + * ODP version of often used C library calls + * @{ + */ + +/** + * Memcpy + * + * ODP version of C library memcpy function. It copies 'num' bytes from source + * to destination address. Source and destination memory blocks must not + * overlap. + * + * @param dst Pointer to destination memory block + * @param src Pointer to source memory block + * @param num Number of bytes to copy + * + * @return 'dst' address + */ +void *odp_memcpy(void *dst, const void *src, size_t num); + +/** + * Memset + * + * ODP version of C library memset function. It sets 'value' to first 'num' + * bytes of memory block pointed by 'ptr'. + * + * @param ptr Pointer to the memory block + * @param value Value to be set + * @param num Number of bytes to set + * + * @return 'ptr' address + */ +void *odp_memset(void *ptr, int value, size_t num); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif |