TianoCore EDK2 master
Loading...
Searching...
No Matches
BaseSortLib.c
Go to the documentation of this file.
1
8#include <Uefi.h>
9
10#include <Library/BaseLib.h>
12#include <Library/DebugLib.h>
14#include <Library/SortLib.h>
15
34VOID
35EFIAPI
37 IN OUT VOID *BufferToSort,
38 IN CONST UINTN Count,
39 IN CONST UINTN ElementSize,
40 IN SORT_COMPARE CompareFunction
41 )
42{
43 VOID *Buffer;
44
45 ASSERT (BufferToSort != NULL);
46 ASSERT (CompareFunction != NULL);
47
48 Buffer = AllocateZeroPool (ElementSize);
49 ASSERT (Buffer != NULL);
50
51 QuickSort (
52 BufferToSort,
53 Count,
54 ElementSize,
55 CompareFunction,
56 Buffer
57 );
58
59 FreePool (Buffer);
60 return;
61}
62
71INTN
72EFIAPI
74 IN CONST VOID *Buffer1,
75 IN CONST VOID *Buffer2
76 )
77{
78 ASSERT (FALSE);
79 return 0;
80}
81
90INTN
91EFIAPI
93 IN CONST VOID *Buffer1,
94 IN CONST VOID *Buffer2
95 )
96{
97 ASSERT (FALSE);
98 return 0;
99}
100
109INTN
110EFIAPI
112 IN CONST VOID *Buffer1,
113 IN CONST VOID *Buffer2
114 )
115{
116 ASSERT (FALSE);
117 return 0;
118}
UINT64 UINTN
INT64 INTN
VOID EFIAPI QuickSort(IN OUT VOID *BufferToSort, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN BASE_SORT_COMPARE CompareFunction, OUT VOID *BufferOneElement)
Definition: QuickSort.c:36
VOID EFIAPI PerformQuickSort(IN OUT VOID *BufferToSort, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN SORT_COMPARE CompareFunction)
Definition: BaseSortLib.c:36
INTN EFIAPI StringNoCaseCompare(IN CONST VOID *Buffer1, IN CONST VOID *Buffer2)
Definition: BaseSortLib.c:92
INTN EFIAPI DevicePathCompare(IN CONST VOID *Buffer1, IN CONST VOID *Buffer2)
Definition: BaseSortLib.c:73
INTN EFIAPI StringCompare(IN CONST VOID *Buffer1, IN CONST VOID *Buffer2)
Definition: BaseSortLib.c:111
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
#define NULL
Definition: Base.h:319
#define CONST
Definition: Base.h:259
#define FALSE
Definition: Base.h:307
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284