]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePerformanceLibNull/PerformanceLib.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BasePerformanceLibNull / PerformanceLib.c
index ec88d848ae3c0dbd827375c295b444be1010a593..95ecced4cf901a1c13cefb0fd374456d8b7069cf 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Base Performance Library which provides no service.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
-  Module Name:  PerformanceLib.c\r
-\r
 **/\r
 \r
+\r
+#include <Base.h>\r
+\r
+\r
+#include <Library/PerformanceLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/PcdLib.h>\r
+\r
 /**\r
   Creates a record for the beginning of a performance measurement. \r
   \r
   If TimeStamp is zero, then this function reads the current time stamp\r
   and adds that time stamp value to the record as the start time.\r
 \r
-       @param  Handle                  Pointer to environment specific context used\r
+  @param  Handle                  Pointer to environment specific context used\r
                                   to identify the component being measured.\r
-       @param  Token                   Pointer to a Null-terminated ASCII string\r
+  @param  Token                   Pointer to a Null-terminated ASCII string\r
                                   that identifies the component being measured.\r
-       @param  Module                  Pointer to a Null-terminated ASCII string\r
+  @param  Module                  Pointer to a Null-terminated ASCII string\r
                                   that identifies the module being measured.\r
-       @param  TimeStamp               64-bit time stamp.\r
+  @param  TimeStamp               64-bit time stamp.\r
 \r
   @retval RETURN_SUCCESS          The start of the measurement was recorded.\r
-       @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record the measurement.\r
+  @retval RETURN_OUT_OF_RESOURCES There are not enough resources to record the measurement.\r
+  @retval RETURN_DEVICE_ERROR     A device error reading the time stamp.\r
 \r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 StartPerformanceMeasurement (\r
   IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,\r
-  IN CONST CHAR8  *Module,\r
+  IN CONST CHAR8  *Token,   OPTIONAL\r
+  IN CONST CHAR8  *Module,  OPTIONAL\r
   IN UINT64       TimeStamp\r
   )\r
 {\r
@@ -57,24 +64,25 @@ StartPerformanceMeasurement (
   the current time stamp and adds that time stamp value to the record as the end time.\r
   If this function is called multiple times for the same record, then the end time is overwritten.\r
 \r
-       @param  Handle                  Pointer to environment specific context used\r
+  @param  Handle                  Pointer to environment specific context used\r
                                   to identify the component being measured.\r
-       @param  Token                   Pointer to a Null-terminated ASCII string\r
+  @param  Token                   Pointer to a Null-terminated ASCII string\r
                                   that identifies the component being measured.\r
-       @param  Module                  Pointer to a Null-terminated ASCII string\r
+  @param  Module                  Pointer to a Null-terminated ASCII string\r
                                   that identifies the module being measured.\r
-       @param  TimeStamp               64-bit time stamp.\r
+  @param  TimeStamp               64-bit time stamp.\r
 \r
   @retval RETURN_SUCCESS          The end of  the measurement was recorded.\r
-       @retval RETURN_NOT_FOUND        The specified measurement record could not be found.\r
+  @retval RETURN_NOT_FOUND        The specified measurement record could not be found.\r
+  @retval RETURN_DEVICE_ERROR     A device error reading the time stamp.\r
 \r
 **/\r
 RETURN_STATUS\r
 EFIAPI\r
 EndPerformanceMeasurement (\r
   IN CONST VOID   *Handle,  OPTIONAL\r
-  IN CONST CHAR8  *Token,\r
-  IN CONST CHAR8  *Module,\r
+  IN CONST CHAR8  *Token,   OPTIONAL\r
+  IN CONST CHAR8  *Module,  OPTIONAL\r
   IN UINT64       TimeStamp\r
   )\r
 {\r
@@ -146,7 +154,7 @@ GetPerformanceMeasurement (
 \r
   @retval TRUE                    The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
                                   PcdPerformanceLibraryPropertyMask is set.\r
-       @retval FALSE                   The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
+  @retval FALSE                   The PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED bit of\r
                                   PcdPerformanceLibraryPropertyMask is clear.\r
 \r
 **/\r
@@ -156,5 +164,5 @@ PerformanceMeasurementEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0);\r
 }\r