]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseSynchronizationLib/InterlockedIncrementMsc.c
MdePkg: Apply uncrustify changes
[mirror_edk2.git] / MdePkg / Library / BaseSynchronizationLib / InterlockedIncrementMsc.c
1 /** @file
2 InterLockedIncrement function
3
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 /**
10 Microsoft Visual Studio 7.1 Function Prototypes for I/O Intrinsics.
11 **/
12
13 long
14 _InterlockedIncrement (
15 long *lpAddend
16 );
17
18 #pragma intrinsic(_InterlockedIncrement)
19
20 /**
21 Performs an atomic increment of an 32-bit unsigned integer.
22
23 Performs an atomic increment of the 32-bit unsigned integer specified by
24 Value and returns the incremented value. The increment operation must be
25 performed using MP safe mechanisms. The state of the return value is not
26 guaranteed to be MP safe.
27
28 @param Value A pointer to the 32-bit value to increment.
29
30 @return The incremented value.
31
32 **/
33 UINT32
34 EFIAPI
35 InternalSyncIncrement (
36 IN volatile UINT32 *Value
37 )
38 {
39 return _InterlockedIncrement ((long *)(Value));
40 }