/** @file\r
GCC inline implementation of BaseSynchronizationLib processor specific functions.\r
\r
- Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
Portions copyright (c) 2008 - 2009, Apple Inc. 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
);\r
\r
return Result; \r
-\r
}\r
\r
\r
IN UINT32 ExchangeValue\r
)\r
{\r
-// GCC 4.1 and forward supports atomic builtins \r
-#if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)))\r
-\r
- return __sync_val_compare_and_swap (Value, CompareValue, ExchangeValue);\r
\r
-#else\r
\r
__asm__ __volatile__ (\r
"lock \n\t"\r
"cc"\r
);\r
\r
- return CompareValue;\r
-\r
-#endif\r
+ return CompareValue;\r
}\r
\r
\r
IN UINT64 ExchangeValue\r
)\r
{\r
-// GCC 4.1 and forward supports atomic builtins \r
-#if ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)))\r
-\r
- return __sync_val_compare_and_swap (Value, CompareValue, ExchangeValue);\r
-\r
-#else\r
\r
__asm__ __volatile__ (\r
"lock \n\t"\r
);\r
\r
return CompareValue;\r
-\r
-#endif\r
}\r
\r
\r