]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/UefiMemoryLib/MemLib.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / UefiMemoryLib / MemLib.c
CommitLineData
dd51a993 1/** @file\r
cc4e0485 2 Base Memory Library functions implementation bases on Uefi Boot Service.\r
dd51a993 3\r
19388d29 4 Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
9344f092 5 SPDX-License-Identifier: BSD-2-Clause-Patent\r
dd51a993 6\r
dd51a993 7**/\r
8\r
9#include "MemLibInternals.h"\r
10\r
f80b0830 11/**\r
12 Copies a source buffer to a destination buffer, and returns the destination buffer.\r
13\r
14 This function wraps the gBS->CopyMem().\r
15\r
2fc59a00 16 @param DestinationBuffer The pointer to the destination buffer of the memory copy.\r
17 @param SourceBuffer The pointer to the source buffer of the memory copy.\r
18 @param Length The number of bytes to copy from SourceBuffer to DestinationBuffer.\r
f80b0830 19\r
20 @return DestinationBuffer.\r
21\r
22**/\r
dd51a993 23VOID *\r
24EFIAPI\r
25InternalMemCopyMem (\r
2f88bd3a
MK
26 OUT VOID *Destination,\r
27 IN CONST VOID *Source,\r
28 IN UINTN Length\r
dd51a993 29 )\r
30{\r
2f88bd3a 31 gBS->CopyMem (Destination, (VOID *)Source, Length);\r
dd51a993 32 return Destination;\r
33}\r
34\r
f80b0830 35/**\r
36 Fills a target buffer with a byte value, and returns the target buffer.\r
37\r
38 This function wraps the gBS->SetMem().\r
39\r
40 @param Buffer Memory to set.\r
2fc59a00 41 @param Size The number of bytes to set.\r
f80b0830 42 @param Value Value of the set operation.\r
43\r
44 @return Buffer.\r
45\r
46**/\r
dd51a993 47VOID *\r
48EFIAPI\r
49InternalMemSetMem (\r
2f88bd3a
MK
50 OUT VOID *Buffer,\r
51 IN UINTN Size,\r
52 IN UINT8 Value\r
dd51a993 53 )\r
54{\r
55 gBS->SetMem (Buffer, Size, Value);\r
56 return Buffer;\r
57}\r