Safe API Framework 0.1.0 build 384e6ae
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Loading...
Searching...
No Matches
rte_mem_util.h
Go to the documentation of this file.
1#ifndef RTE_MEM_UTIL_H
2#define RTE_MEM_UTIL_H
3
27
28#include <stddef.h>
29#include <string.h>
30
39static inline void rte_mem_set(void *dest, int value, size_t count)
40{
41 (void)memset(dest, value, count);
42}
43
56static inline void rte_mem_copy(void *dest, const void *src, size_t count)
57{
58 (void)memcpy(dest, src, count);
59}
60
70static inline int rte_mem_compare(const void *a, const void *b, size_t count)
71{
72 return memcmp(a, b, count);
73}
74
75#endif /* RTE_MEM_UTIL_H */
static int rte_mem_compare(const void *a, const void *b, size_t count)
Byte-for-byte compares count bytes of a against b - the one sanctioned call site for libc memcmp() in...
static void rte_mem_copy(void *dest, const void *src, size_t count)
Copies count bytes from src to dest - the one sanctioned call site for libc memcpy() in this framewor...
static void rte_mem_set(void *dest, int value, size_t count)
Fills count bytes starting at dest with value - the one sanctioned call site for libc memset() in thi...