diff options
Diffstat (limited to 'MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c')
-rw-r--r-- | MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c b/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c index 009341a9b02d..5ea87c17bdaf 100644 --- a/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c +++ b/MdePkg/Library/BaseSynchronizationLib/SynchronizationGcc.c @@ -1,22 +1,16 @@ /** @file Implementation of synchronization functions. - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> - This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + SPDX-License-Identifier: BSD-2-Clause-Patent **/ #include "BaseSynchronizationLibInternals.h" // -// GCC inline assembly for Read Write Barrier +// GCC inline assembly for Read Write Barrier // #define _ReadWriteBarrier() do { __asm__ __volatile__ ("": : : "memory"); } while(0) @@ -28,7 +22,7 @@ optimal spin lock performance. This function retrieves the spin lock alignment requirements for optimal - performance on a given CPU architecture. The spin lock alignment is byte alignment. + performance on a given CPU architecture. The spin lock alignment is byte alignment. It must be a power of two and is returned by this function. If there are no alignment requirements, then 1 must be returned. The spin lock synchronization functions must function correctly if the spin lock size and alignment values @@ -191,7 +185,7 @@ AcquireSpinLockOrFail ( { SPIN_LOCK LockValue; VOID *Result; - + ASSERT (SpinLock != NULL); LockValue = *SpinLock; @@ -247,8 +241,7 @@ ReleaseSpinLock ( Performs an atomic increment of the 32-bit unsigned integer specified by Value and returns the incremented value. The increment operation must be - performed using MP safe mechanisms. The state of the return value is not - guaranteed to be MP safe. + performed using MP safe mechanisms. If Value is NULL, then ASSERT(). @@ -272,8 +265,7 @@ InterlockedIncrement ( Performs an atomic decrement of the 32-bit unsigned integer specified by Value and returns the decremented value. The decrement operation must be - performed using MP safe mechanisms. The state of the return value is not - guaranteed to be MP safe. + performed using MP safe mechanisms. If Value is NULL, then ASSERT(). |