]>
git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseMemoryLibRepStr/MemLibInternals.h
2 Declaration of internal functions for Base Memory Library.
4 The following BaseMemoryLib instances share the same version of this file:
12 Copyright (c) 2006, Intel Corporation<BR>
13 All rights reserved. This program and the accompanying materials
14 are licensed and made available under the terms and conditions of the BSD License
15 which accompanies this distribution. The full text of the license may be found at
16 http://opensource.org/licenses/bsd-license.php
18 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
19 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
23 #ifndef __MEM_LIB_INTERNALS__
24 #define __MEM_LIB_INTERNALS__
27 #include <Library/BaseMemoryLib.h>
28 #include <Library/BaseLib.h>
29 #include <Library/DebugLib.h>
33 Copy Length bytes from Source to Destination.
35 @param Destination Target of copy
36 @param Source Place to copy from
37 @param Length Number of bytes to copy
45 OUT VOID
*DestinationBuffer
,
46 IN CONST VOID
*SourceBuffer
,
51 Set Buffer to Value for Size bytes.
53 @param Buffer Memory to set.
54 @param Size Number of bytes to set
55 @param Value Value of the set operation.
69 Fills a target buffer with a 16-bit value, and returns the target buffer.
71 @param Buffer Pointer to the target buffer to fill.
72 @param Length Number of bytes in Buffer to fill.
73 @param Value Value with which to fill Length bytes of Buffer.
87 Fills a target buffer with a 32-bit value, and returns the target buffer.
89 @param Buffer Pointer to the target buffer to fill.
90 @param Length Number of bytes in Buffer to fill.
91 @param Value Value with which to fill Length bytes of Buffer.
105 Fills a target buffer with a 64-bit value, and returns the target buffer.
107 @param Buffer Pointer to the target buffer to fill.
108 @param Length Number of bytes in Buffer to fill.
109 @param Value Value with which to fill Length bytes of Buffer.
116 InternalMemSetMem64 (
123 Set Buffer to 0 for Size bytes.
125 @param Buffer Memory to set.
126 @param Size Number of bytes to set
139 Compares two memory buffers of a given length.
141 @param DestinationBuffer First memory buffer
142 @param SourceBuffer Second memory buffer
143 @param Length Length of DestinationBuffer and SourceBuffer memory
144 regions to compare. Must be non-zero.
146 @retval 0 if MemOne == MemTwo
151 InternalMemCompareMem (
152 IN CONST VOID
*DestinationBuffer
,
153 IN CONST VOID
*SourceBuffer
,
158 Scans a target buffer for an 8-bit value, and returns a pointer to the
159 matching 8-bit value in the target buffer.
161 @param Buffer Pointer to the target buffer to scan.
162 @param Length Number of bytes in Buffer to scan. Must be non-zero.
163 @param Value Value to search for in the target buffer.
165 @return Pointer to the first occurrence or NULL if not found.
170 InternalMemScanMem8 (
171 IN CONST VOID
*Buffer
,
177 Scans a target buffer for a 16-bit value, and returns a pointer to the
178 matching 16-bit value in the target buffer.
180 @param Buffer Pointer to the target buffer to scan.
181 @param Length Number of bytes in Buffer to scan. Must be non-zero.
182 @param Value Value to search for in the target buffer.
184 @return Pointer to the first occurrence or NULL if not found.
189 InternalMemScanMem16 (
190 IN CONST VOID
*Buffer
,
196 Scans a target buffer for a 32-bit value, and returns a pointer to the
197 matching 32-bit value in the target buffer.
199 @param Buffer Pointer to the target buffer to scan.
200 @param Length Number of bytes in Buffer to scan. Must be non-zero.
201 @param Value Value to search for in the target buffer.
203 @return Pointer to the first occurrence or NULL if not found.
208 InternalMemScanMem32 (
209 IN CONST VOID
*Buffer
,
215 Scans a target buffer for a 64-bit value, and returns a pointer to the
216 matching 64-bit value in the target buffer.
218 @param Buffer Pointer to the target buffer to scan.
219 @param Length Number of bytes in Buffer to scan. Must be non-zero.
220 @param Value Value to search for in the target buffer.
222 @return Pointer to the first occurrence or NULL if not found.
227 InternalMemScanMem64 (
228 IN CONST VOID
*Buffer
,