EDK2 doxygen online documents - Firmware Encoding Index 1
EDK2 doxygen online documents - Firmware Encoding Index

EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/CopyMemWrapper.c

Go to the documentation of this file.
00001 /*++
00002 
00003 Copyright (c) 2004 - 2006, Intel Corporation. All rights reserved.<BR>
00004 This program and the accompanying materials                          
00005 are licensed and made available under the terms and conditions of the BSD License         
00006 which accompanies this distribution.  The full text of the license may be found at        
00007 http://opensource.org/licenses/bsd-license.php                                            
00008                                                                                           
00009 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     
00010 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.  
00011 
00012 Module Name:
00013 
00014   CopyMemWrapper.c
00015   
00016 Abstract: 
00017 
00018   CopyMem() implementation.
00019 
00020 --*/
00021 
00022 #include "BaseMemoryLibInternal.h"
00023 
00040 VOID *
00041 EFIAPI
00042 GlueCopyMem (
00043   OUT VOID       *DestinationBuffer,
00044   IN CONST VOID  *SourceBuffer,
00045   IN UINTN       Length
00046   )
00047 {
00048   if (Length == 0) {
00049     return DestinationBuffer;
00050   }
00051   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)DestinationBuffer));
00052   ASSERT ((Length - 1) <= (MAX_ADDRESS - (UINTN)SourceBuffer));
00053 
00054   if (DestinationBuffer == SourceBuffer) {
00055     return DestinationBuffer;
00056   }
00057   return InternalMemCopyMem (DestinationBuffer, SourceBuffer, Length);
00058 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines