Split wrapper functions into separate source files to reduce image code size
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@168 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Compares two memory buffers of a given length.
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Copy Length bytes from Source to Destination.
|
||||
@@ -51,8 +51,14 @@ CopyMem (
|
||||
IN UINTN Length
|
||||
)
|
||||
{
|
||||
ASSERT (Length <= MAX_ADDRESS - (UINTN)Destination + 1);
|
||||
ASSERT (Length <= MAX_ADDRESS - (UINTN)Source + 1);
|
||||
ASSERT (
|
||||
Destination == NULL ||
|
||||
Length <= MAX_ADDRESS - (UINTN)Destination + 1
|
||||
);
|
||||
ASSERT (
|
||||
Source == NULL ||
|
||||
Length <= MAX_ADDRESS - (UINTN)Source + 1
|
||||
);
|
||||
if (Destination == Source || Length == 0) {
|
||||
return Destination;
|
||||
}
|
||||
|
@@ -20,23 +20,7 @@
|
||||
|
||||
**/
|
||||
|
||||
/**
|
||||
Set Buffer to Value for Size bytes.
|
||||
|
||||
@param Buffer Memory to set.
|
||||
@param Size Number of bytes to set
|
||||
@param Value Value of the set operation.
|
||||
|
||||
@return Buffer
|
||||
|
||||
**/
|
||||
VOID *
|
||||
EFIAPI
|
||||
InternalMemSetMem (
|
||||
OUT VOID *Buffer,
|
||||
IN UINTN Length,
|
||||
IN UINT8 Value
|
||||
);
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Fills a target buffer with a 16-bit value, and returns the target buffer.
|
||||
|
@@ -10,7 +10,7 @@
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name: MemLibWrappers.h
|
||||
Module Name: MemLibInternals.h
|
||||
|
||||
The following BaseMemoryLib instances share the same version of this file:
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
**/
|
||||
|
||||
#ifndef __MEM_LIB_WRAPPERS__
|
||||
#define __MEM_LIB_WRAPPERS__
|
||||
#ifndef __MEM_LIB_INTERNALS__
|
||||
#define __MEM_LIB_INTERNALS__
|
||||
|
||||
/**
|
||||
Copy Length bytes from Source to Destination.
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Scans a target buffer for a 16-bit value, and returns a pointer to the
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Scans a target buffer for a 32-bit value, and returns a pointer to the
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Scans a target buffer for a 64-bit value, and returns a pointer to the
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Scans a target buffer for an 8-bit value, and returns a pointer to the
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Fills a target buffer with a 16-bit value, and returns the target buffer.
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Fills a target buffer with a 32-bit value, and returns the target buffer.
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Fills a target buffer with a 64-bit value, and returns the target buffer.
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Set Buffer to Value for Size bytes.
|
||||
|
@@ -23,7 +23,7 @@
|
||||
|
||||
**/
|
||||
|
||||
#include "MemLibWrappers.h"
|
||||
#include "MemLibInternals.h"
|
||||
|
||||
/**
|
||||
Set Buffer to 0 for Size bytes.
|
||||
|
Reference in New Issue
Block a user