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

EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/Ipf/SetMem.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 
00013 Module Name:
00014 
00015   SetMem.c
00016   
00017 Abstract: 
00018 
00019   Internal SetMem
00020 
00021 --*/
00022 
00023 #include "BaseMemoryLibInternal.h"
00024 
00035 VOID *
00036 EFIAPI
00037 InternalMemSetMem (
00038   IN      VOID                      *Buffer,
00039   IN      UINTN                     Size,
00040   IN      UINT8                     Value
00041   )
00042 {
00043   //
00044   // Declare the local variables that actually move the data elements as
00045   // volatile to prevent the optimizer from replacing this function with
00046   // the intrinsic memset()
00047   //
00048   volatile UINT8                    *Pointer;
00049 
00050   Pointer = (UINT8*)Buffer;
00051   while (Size-- != 0) {
00052     *(Pointer++) = Value;
00053   }
00054   return Buffer;
00055 }
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Defines