]> git.proxmox.com Git - mirror_edk2.git/blame - BaseTools/Source/C/Common/BinderFuncs.c
BaseTools: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / BaseTools / Source / C / Common / BinderFuncs.c
CommitLineData
30fdf114 1/** @file\r
97fa0ee9 2Binder function implementations for ANSI C libraries.\r
30fdf114 3\r
97fa0ee9 4Copyright (c) 1999 - 2014, Intel Corporation. All rights reserved.<BR>\r
2e351cbe 5SPDX-License-Identifier: BSD-2-Clause-Patent\r
30fdf114 6\r
30fdf114
LG
7**/\r
8\r
9#include "BinderFuncs.h"\r
10#include "CommonLib.h"\r
11#include <stdlib.h>\r
12#include <string.h>\r
13\r
14//\r
15// Binder Function Implementations\r
16//\r
17\r
18VOID *\r
19CommonLibBinderAllocate (\r
20 IN UINTN Size\r
21 )\r
22{\r
23 return (VOID *) malloc (Size);\r
24}\r
25\r
26VOID\r
27CommonLibBinderFree (\r
28 IN VOID *Pointer\r
29 )\r
30{\r
31 free (Pointer);\r
32}\r
33\r
34VOID\r
35CommonLibBinderCopyMem (\r
36 IN VOID *Destination,\r
37 IN VOID *Source,\r
38 IN UINTN Length\r
39 )\r
40{\r
41 memmove (Destination, Source, Length);\r
42}\r
43\r
44VOID\r
45CommonLibBinderSetMem (\r
46 IN VOID *Destination,\r
47 IN UINTN Length,\r
48 IN UINT8 Value\r
49 )\r
50{\r
51 memset (Destination, Value, Length);\r
52}\r
53\r
54INTN\r
55CommonLibBinderCompareMem (\r
56 IN VOID *MemOne,\r
57 IN VOID *MemTwo,\r
58 IN UINTN Length\r
59 )\r
60{\r
61 return memcmp (MemOne, MemTwo, Length);\r
62}\r
63\r
64BOOLEAN\r
65CommonLibBinderCompareGuid (\r
66 IN EFI_GUID *Guid1,\r
67 IN EFI_GUID *Guid2\r
68 )\r
69{\r
70 return CompareGuid (Guid1, Guid2) ? FALSE : TRUE;\r
71}\r
72\r
73\r
74\r