/** @file\r
Implementation of synchronization functions.\r
\r
- Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2016, 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
INT64 Cycle;\r
INT64 Delta;\r
\r
- if (PcdGet32 (PcdSpinLockTimeout) > 0) {\r
+ if (PcdGet32 (PcdSpinLockTimeout) == 0) {\r
+ while (!AcquireSpinLockOrFail (SpinLock)) {\r
+ CpuPause ();\r
+ }\r
+ } else if (!AcquireSpinLockOrFail (SpinLock)) {\r
//\r
// Get the current timer value\r
//\r
Total += Delta;\r
ASSERT (Total < Timeout);\r
}\r
- } else {\r
- while (!AcquireSpinLockOrFail (SpinLock)) {\r
- CpuPause ();\r
- }\r
}\r
return SpinLock;\r
}\r