safec 3.9
Safe C Library - ISO TR24731 Bounds Checking Interface
Loading...
Searching...
No Matches
mem_primitives_lib.h File Reference
+ This graph shows which files directly or indirectly include this file:

Macros

#define __WORDSIZE   (8 * SIZEOF_SIZE_T)
 
#define ASM_VOLATILE
 
#define COMPILER_BARRIER
 
#define MEMORY_BARRIER   COMPILER_BARRIER
 

Functions

void mem_prim_move (void *dest, const void *src, uint32_t len)
 Moves at most len of bytes from src to dest.
 
void mem_prim_move8 (uint8_t *dest, const uint8_t *src, uint32_t len)
 Moves at most len of uint8_t's from src to dest.
 
void mem_prim_move16 (uint16_t *dest, const uint16_t *src, uint32_t len)
 Moves at most len uint16_t's from src to dest.
 
void mem_prim_move32 (uint32_t *dest, const uint32_t *src, uint32_t len)
 Moves at most len of uint32_t's from src to dest.
 
void mem_prim_set (void *dest, uint32_t len, uint8_t value)
 
void mem_prim_set16 (uint16_t *dest, uint32_t len, uint16_t value)
 Sets len uint16_t's starting at dest to the specified value.
 
void mem_prim_set32 (uint32_t *dest, uint32_t len, uint32_t value)
 Sets len uint32_t's starting at dest to the specified value.
 

Macro Definition Documentation

◆ __WORDSIZE

#define __WORDSIZE   (8 * SIZEOF_SIZE_T)

◆ ASM_VOLATILE

#define ASM_VOLATILE

◆ COMPILER_BARRIER

#define COMPILER_BARRIER

◆ MEMORY_BARRIER

#define MEMORY_BARRIER   COMPILER_BARRIER

Function Documentation

◆ mem_prim_move()

void mem_prim_move ( void * dest,
const void * src,
uint32_t len )
extern

Moves at most len of bytes from src to dest.

Dest may overlap with src.

Parameters
[out]destpointer to the memory that will be replaced by src.
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number bytes of src that can be copied

◆ mem_prim_move8()

void mem_prim_move8 ( uint8_t * dest,
const uint8_t * src,
uint32_t len )
extern

Moves at most len of uint8_t's from src to dest.

The destination may overlap with source.

Parameters
[out]destpointer to the memory that will be replaced by src
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number uint8_t of src that can be copied

◆ mem_prim_move16()

void mem_prim_move16 ( uint16_t * dest,
const uint16_t * src,
uint32_t len )
extern

Moves at most len uint16_t's from src to dest.

The destination may overlap with source.

Parameters
[out]destpointer to the memory that will be replaced by src.
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number uint16_t of src that can be copied

◆ mem_prim_move32()

void mem_prim_move32 ( uint32_t * dest,
const uint32_t * src,
uint32_t len )
extern

Moves at most len of uint32_t's from src to dest.

The destination may overlap with source.

Parameters
[out]destpointer to the memory that will be replaced by src.
[in]srcpointer to the memory that will be copied to dest
[in]lenmaximum number uint32_t of sp that can be copied

◆ mem_prim_set()

void mem_prim_set ( void * dest,
uint32_t len,
uint8_t value )
extern

◆ mem_prim_set16()

void mem_prim_set16 ( uint16_t * dest,
uint32_t len,
uint16_t value )
extern

Sets len uint16_t's starting at dest to the specified value.

Pointers must meet system alignment requirements.

Parameters
[out]destpointer to memory that will be set to value
[in]lennumber of uint16_t's to be set
[in]valueuint16_t value

◆ mem_prim_set32()

void mem_prim_set32 ( uint32_t * dest,
uint32_t len,
uint32_t value )
extern

Sets len uint32_t's starting at dest to the specified value.

Pointers must meet system alignment requirements.

Parameters
[out]destpointer to memory that will be set to value
[in]lennumber of uint32_t's to be set
[in]valueuint32_t value