]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseSynchronizationLib/BaseSynchronizationLibInternals.h
Minor grammatical work--mostly adding periods. Items with ONLY period added did...
[mirror_edk2.git] / MdePkg / Library / BaseSynchronizationLib / BaseSynchronizationLibInternals.h
CommitLineData
720d3c5f 1/** @file\r
65330ad3 2 Declaration of internal functions in BaseSynchronizationLib.\r
720d3c5f 3\r
2fc59a00 4 Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
e2d9bfb2 5 This program and the accompanying materials\r
720d3c5f 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
2fc59a00 8 http://opensource.org/licenses/bsd-license.php.\r
720d3c5f 9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
65330ad3 15#ifndef __BASE_SYNCHRONIZATION_LIB_INTERNALS__\r
16#define __BASE_SYNCHRONIZATION_LIB_INTERNALS__\r
720d3c5f 17\r
18#include <Base.h>\r
19#include <Library/SynchronizationLib.h>\r
20#include <Library/BaseLib.h>\r
21#include <Library/DebugLib.h>\r
22#include <Library/TimerLib.h>\r
23#include <Library/PcdLib.h>\r
24\r
25/**\r
26 Performs an atomic increment of an 32-bit unsigned integer.\r
27\r
28 Performs an atomic increment of the 32-bit unsigned integer specified by\r
29 Value and returns the incremented value. The increment operation must be\r
30 performed using MP safe mechanisms. The state of the return value is not\r
31 guaranteed to be MP safe.\r
32\r
33 @param Value A pointer to the 32-bit value to increment.\r
34\r
35 @return The incremented value.\r
36\r
37**/\r
38UINT32\r
39EFIAPI\r
40InternalSyncIncrement (\r
41 IN volatile UINT32 *Value\r
42 );\r
43\r
44\r
45/**\r
46 Performs an atomic decrement of an 32-bit unsigned integer.\r
47\r
48 Performs an atomic decrement of the 32-bit unsigned integer specified by\r
49 Value and returns the decrement value. The decrement operation must be\r
50 performed using MP safe mechanisms. The state of the return value is not\r
51 guaranteed to be MP safe.\r
52\r
53 @param Value A pointer to the 32-bit value to decrement.\r
54\r
55 @return The decrement value.\r
56\r
57**/\r
58UINT32\r
59EFIAPI\r
60InternalSyncDecrement (\r
61 IN volatile UINT32 *Value\r
62 );\r
63\r
64\r
65/**\r
66 Performs an atomic compare exchange operation on a 32-bit unsigned integer.\r
67\r
68 Performs an atomic compare exchange operation on the 32-bit unsigned integer\r
69 specified by Value. If Value is equal to CompareValue, then Value is set to\r
70 ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,\r
71 then Value is returned. The compare exchange operation must be performed using\r
72 MP safe mechanisms.\r
73\r
74 @param Value A pointer to the 32-bit value for the compare exchange\r
75 operation.\r
2fc59a00 76 @param CompareValue A 32-bit value used in compare operation.\r
77 @param ExchangeValue A 32-bit value used in exchange operation.\r
720d3c5f 78\r
79 @return The original *Value before exchange.\r
80\r
81**/\r
82UINT32\r
83EFIAPI\r
84InternalSyncCompareExchange32 (\r
85 IN volatile UINT32 *Value,\r
86 IN UINT32 CompareValue,\r
87 IN UINT32 ExchangeValue\r
88 );\r
89\r
90\r
91/**\r
92 Performs an atomic compare exchange operation on a 64-bit unsigned integer.\r
93\r
94 Performs an atomic compare exchange operation on the 64-bit unsigned integer specified\r
95 by Value. If Value is equal to CompareValue, then Value is set to ExchangeValue and\r
96 CompareValue is returned. If Value is not equal to CompareValue, then Value is returned.\r
97 The compare exchange operation must be performed using MP safe mechanisms.\r
98\r
99 @param Value A pointer to the 64-bit value for the compare exchange\r
100 operation.\r
2fc59a00 101 @param CompareValue A 64-bit value used in compare operation.\r
102 @param ExchangeValue A 64-bit value used in exchange operation.\r
720d3c5f 103\r
104 @return The original *Value before exchange.\r
105\r
106**/\r
107UINT64\r
108EFIAPI\r
109InternalSyncCompareExchange64 (\r
110 IN volatile UINT64 *Value,\r
111 IN UINT64 CompareValue,\r
112 IN UINT64 ExchangeValue\r
113 );\r
114\r
115#endif\r