This function compares two memory regions for specified number of bytes. This function takes size of two memory regions to make sure not to read from or write to out of bound memory region. Note that this function compares till end to make it execute in constant time irrespective of the content of input memory.
Sets the destination memory of given length with given data
Prototype
s32 Xil_SMemCmp_CT(const void *Src1, const u32 Src1Size, const void *Src2, const u32 Src2Size, const u32 CmpLen);
Parameters
The following table lists the Xil_SMemCmp_CT function arguments.
| Type | Member | Description |
|---|---|---|
| const void * | Src1 | - Pointer to first memory range |
| const u32 | Src1Size | - Maximum size of first memory range |
| const void * | Src2 | - Pointer to second memory range |
| const u32 | Src2Size | - Maximum size of second memory range |
| const u32 | CmpLen | - Number of bytes to be compared |