]>
git.proxmox.com Git - mirror_edk2.git/blob - OldMdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
2 Declaration of internal functions for Base Memory Library.
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 Module Name: MemLibInternals.h
15 The following BaseMemoryLib instances share the same version of this file:
26 #ifndef __MEM_LIB_INTERNALS__
27 #define __MEM_LIB_INTERNALS__
30 Copy Length bytes from Source to Destination.
32 @param Destination Target of copy
33 @param Source Place to copy from
34 @param Length Number of bytes to copy
42 OUT VOID
*DestinationBuffer
,
43 IN CONST VOID
*SourceBuffer
,
48 Set Buffer to Value for Size bytes.
50 @param Buffer Memory to set.
51 @param Size Number of bytes to set
52 @param Value Value of the set operation.
66 Fills a target buffer with a 16-bit value, and returns the target buffer.
68 @param Buffer Pointer to the target buffer to fill.
69 @param Length Number of bytes in Buffer to fill.
70 @param Value Value with which to fill Length bytes of Buffer.
84 Fills a target buffer with a 32-bit value, and returns the target buffer.
86 @param Buffer Pointer to the target buffer to fill.
87 @param Length Number of bytes in Buffer to fill.
88 @param Value Value with which to fill Length bytes of Buffer.
102 Fills a target buffer with a 64-bit value, and returns the target buffer.
104 @param Buffer Pointer to the target buffer to fill.
105 @param Length Number of bytes in Buffer to fill.
106 @param Value Value with which to fill Length bytes of Buffer.
113 InternalMemSetMem64 (
120 Set Buffer to 0 for Size bytes.
122 @param Buffer Memory to set.
123 @param Size Number of bytes to set
136 Compares two memory buffers of a given length.
138 @param DestinationBuffer First memory buffer
139 @param SourceBuffer Second memory buffer
140 @param Length Length of DestinationBuffer and SourceBuffer memory
141 regions to compare. Must be non-zero.
143 @retval 0 if MemOne == MemTwo
148 InternalMemCompareMem (
149 IN CONST VOID
*DestinationBuffer
,
150 IN CONST VOID
*SourceBuffer
,
155 Scans a target buffer for an 8-bit value, and returns a pointer to the
156 matching 8-bit value in the target buffer.
158 @param Buffer Pointer to the target buffer to scan.
159 @param Length Number of bytes in Buffer to scan. Must be non-zero.
160 @param Value Value to search for in the target buffer.
162 @return Pointer to the first occurrence or NULL if not found.
167 InternalMemScanMem8 (
168 IN CONST VOID
*Buffer
,
174 Scans a target buffer for a 16-bit value, and returns a pointer to the
175 matching 16-bit value in the target buffer.
177 @param Buffer Pointer to the target buffer to scan.
178 @param Length Number of bytes in Buffer to scan. Must be non-zero.
179 @param Value Value to search for in the target buffer.
181 @return Pointer to the first occurrence or NULL if not found.
186 InternalMemScanMem16 (
187 IN CONST VOID
*Buffer
,
193 Scans a target buffer for a 32-bit value, and returns a pointer to the
194 matching 32-bit value in the target buffer.
196 @param Buffer Pointer to the target buffer to scan.
197 @param Length Number of bytes in Buffer to scan. Must be non-zero.
198 @param Value Value to search for in the target buffer.
200 @return Pointer to the first occurrence or NULL if not found.
205 InternalMemScanMem32 (
206 IN CONST VOID
*Buffer
,
212 Scans a target buffer for a 64-bit value, and returns a pointer to the
213 matching 64-bit value in the target buffer.
215 @param Buffer Pointer to the target buffer to scan.
216 @param Length Number of bytes in Buffer to scan. Must be non-zero.
217 @param Value Value to search for in the target buffer.
219 @return Pointer to the first occurrence or NULL if not found.
224 InternalMemScanMem64 (
225 IN CONST VOID
*Buffer
,