Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Toggle main menu visibility
Loading...
Searching...
No Matches
sapi_mem_util.h
Go to the documentation of this file.
1
#ifndef SAFEAPI_MEM_UTIL_H
2
#define SAFEAPI_MEM_UTIL_H
3
27
28
#include <stddef.h>
29
#include <string.h>
30
39
static
inline
void
sapi_mem_set
(
void
*dest,
int
value,
size_t
count)
40
{
41
(void)memset(dest, value, count);
42
}
43
56
static
inline
void
sapi_mem_copy
(
void
*dest,
const
void
*src,
size_t
count)
57
{
58
(void)memcpy(dest, src, count);
59
}
60
70
static
inline
int
sapi_mem_compare
(
const
void
*a,
const
void
*b,
size_t
count)
71
{
72
return
memcmp(a, b, count);
73
}
74
75
#endif
/* SAFEAPI_MEM_UTIL_H */
sapi_mem_set
static void sapi_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...
Definition
sapi_mem_util.h:39
sapi_mem_copy
static void sapi_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...
Definition
sapi_mem_util.h:56
sapi_mem_compare
static int sapi_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...
Definition
sapi_mem_util.h:70
include
safeapi
oal
memory
sapi_mem_util.h
Generated by
1.18.0