TianoCore EDK2 master
|
#include <Uefi.h>
#include <Protocol/UnicodeCollation.h>
#include <Protocol/DevicePath.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/DebugLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/SortLib.h>
#include <Library/DevicePathLib.h>
Go to the source code of this file.
Macros | |
#define | USL_FREE_NON_NULL(Pointer) |
Functions | |
VOID EFIAPI | PerformQuickSort (IN OUT VOID *BufferToSort, IN CONST UINTN Count, IN CONST UINTN ElementSize, IN SORT_COMPARE CompareFunction) |
INTN EFIAPI | DevicePathCompare (IN CONST VOID *Buffer1, IN CONST VOID *Buffer2) |
INTN EFIAPI | StringNoCaseCompare (IN CONST VOID *Buffer1, IN CONST VOID *Buffer2) |
INTN EFIAPI | StringCompare (IN CONST VOID *Buffer1, IN CONST VOID *Buffer2) |
Variables | |
STATIC EFI_UNICODE_COLLATION_PROTOCOL * | mUnicodeCollation = NULL |
Library used for sorting routines.
Copyright (c) 2009 - 2021, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file UefiSortLib.c.
#define USL_FREE_NON_NULL | ( | Pointer | ) |
Definition at line 24 of file UefiSortLib.c.
Function to compare 2 device paths for use in QuickSort.
[in] | Buffer1 | pointer to Device Path poiner to compare |
[in] | Buffer2 | pointer to second DevicePath pointer to compare |
0 | Buffer1 equal to Buffer2 |
<0 | Buffer1 is less than Buffer2 |
>0 | Buffer1 is greater than Buffer2 |
Definition at line 91 of file UefiSortLib.c.
VOID EFIAPI PerformQuickSort | ( | IN OUT VOID * | BufferToSort, |
IN CONST UINTN | Count, | ||
IN CONST UINTN | ElementSize, | ||
IN SORT_COMPARE | CompareFunction | ||
) |
Function to perform a Quick Sort alogrithm on a buffer of comparable elements.
Each element must be equal sized.
if BufferToSort is NULL, then ASSERT. if CompareFunction is NULL, then ASSERT.
if Count is < 2 then perform no action. if Size is < 1 then perform no action.
[in,out] | BufferToSort | on call a Buffer of (possibly sorted) elements on return a buffer of sorted elements |
[in] | Count | the number of elements in the buffer to sort |
[in] | ElementSize | Size of an element in bytes |
[in] | CompareFunction | The function to call to perform the comparison of any 2 elements |
Definition at line 52 of file UefiSortLib.c.
Function to compare 2 strings.
[in] | Buffer1 | Pointer to String to compare (CHAR16**). |
[in] | Buffer2 | Pointer to second String to compare (CHAR16**). |
0 | Buffer1 equal to Buffer2. |
<0 | Buffer1 is less than Buffer2. |
>0 | Buffer1 is greater than Buffer2. |
Definition at line 206 of file UefiSortLib.c.
Function to compare 2 strings without regard to case of the characters.
[in] | Buffer1 | Pointer to String to compare. |
[in] | Buffer2 | Pointer to second String to compare. |
0 | Buffer1 equal to Buffer2. |
<0 | Buffer1 is less than Buffer2. |
>0 | Buffer1 is greater than Buffer2. |
Definition at line 170 of file UefiSortLib.c.
STATIC EFI_UNICODE_COLLATION_PROTOCOL* mUnicodeCollation = NULL |
Definition at line 22 of file UefiSortLib.c.