]>
Commit | Line | Data |
---|---|---|
bba9d162 AP |
1 | /**\r |
2 | Assembly implementation of InterlockedCompareExchange16.\r | |
3 | \r | |
4 | Look at the documentation of InterlockedCompareExchange16.\r | |
5 | **/\r | |
6 | UINT16\r | |
7 | EFIAPI\r | |
8 | InternalSyncCompareExchange16 (\r | |
9 | IN volatile UINT16 *Value,\r | |
10 | IN UINT16 CompareValue,\r | |
11 | IN UINT16 ExchangeValue\r | |
12 | );\r | |
13 | \r | |
14 | /**\r | |
15 | Performs an atomic compare exchange operation on a 16-bit unsigned integer.\r | |
16 | \r | |
17 | Performs an atomic compare exchange operation on the 16-bit unsigned integer\r | |
18 | specified by Value. If Value is equal to CompareValue, then Value is set to\r | |
19 | ExchangeValue and CompareValue is returned. If Value is not equal to CompareValue,\r | |
20 | then Value is returned. The compare exchange operation must be performed using\r | |
21 | MP safe mechanisms.\r | |
22 | \r | |
23 | If Value is NULL, then ASSERT().\r | |
24 | \r | |
25 | @param Value A pointer to the 16-bit value for the compare exchange\r | |
26 | operation.\r | |
27 | @param CompareValue 16-bit value used in compare operation.\r | |
28 | @param ExchangeValue 16-bit value used in exchange operation.\r | |
29 | \r | |
30 | @return The original *Value before exchange.\r | |
31 | **/\r | |
32 | UINT16\r | |
33 | EFIAPI\r | |
34 | InterlockedCompareExchange16 (\r | |
35 | IN OUT UINT16 *Value,\r | |
36 | IN UINT16 CompareValue,\r | |
37 | IN UINT16 ExchangeValue\r | |
38 | );\r |