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