11// Licensed to the .NET Foundation under one or more agreements.
22// The .NET Foundation licenses this file to you under the MIT license.
3- // __forceinline implementation of the Interlocked class methods
3+ // FORCEINLINE implementation of the Interlocked class methods
44//
55
66#ifndef __GCENV_INTERLOCKED_INL__
1111#endif // _MSC_VER
1212
1313#ifndef _MSC_VER
14- __forceinline void Interlocked::InterlockedOperationBarrier ()
14+ FORCEINLINE void Interlocked::InterlockedOperationBarrier ()
1515{
1616#if defined(HOST_ARM64) || defined(HOST_LOONGARCH64) || defined(HOST_RISCV64)
1717 // See PAL_InterlockedOperationBarrier() in the PAL
@@ -26,7 +26,7 @@ __forceinline void Interlocked::InterlockedOperationBarrier()
2626// Return:
2727// The resulting incremented value
2828template <typename T>
29- __forceinline T Interlocked::Increment (T volatile *addend)
29+ FORCEINLINE T Interlocked::Increment (T volatile *addend)
3030{
3131#ifdef _MSC_VER
3232 static_assert (sizeof (long ) == sizeof (T), " Size of long must be the same as size of T" );
@@ -44,7 +44,7 @@ __forceinline T Interlocked::Increment(T volatile *addend)
4444// Return:
4545// The resulting decremented value
4646template <typename T>
47- __forceinline T Interlocked::Decrement (T volatile *addend)
47+ FORCEINLINE T Interlocked::Decrement (T volatile *addend)
4848{
4949#ifdef _MSC_VER
5050 static_assert (sizeof (long ) == sizeof (T), " Size of long must be the same as size of T" );
@@ -63,7 +63,7 @@ __forceinline T Interlocked::Decrement(T volatile *addend)
6363// Return:
6464// The previous value of the destination
6565template <typename T>
66- __forceinline T Interlocked::Exchange (T volatile *destination, T value)
66+ FORCEINLINE T Interlocked::Exchange (T volatile *destination, T value)
6767{
6868#ifdef _MSC_VER
6969 static_assert (sizeof (long ) == sizeof (T), " Size of long must be the same as size of T" );
@@ -84,7 +84,7 @@ __forceinline T Interlocked::Exchange(T volatile *destination, T value)
8484// Return:
8585// The original value of the destination
8686template <typename T>
87- __forceinline T Interlocked::CompareExchange (T volatile *destination, T exchange, T comparand)
87+ FORCEINLINE T Interlocked::CompareExchange (T volatile *destination, T exchange, T comparand)
8888{
8989#ifdef _MSC_VER
9090 static_assert (sizeof (long ) == sizeof (T), " Size of long must be the same as size of T" );
@@ -103,7 +103,7 @@ __forceinline T Interlocked::CompareExchange(T volatile *destination, T exchange
103103// Return:
104104// The previous value of the addend
105105template <typename T>
106- __forceinline T Interlocked::ExchangeAdd (T volatile *addend, T value)
106+ FORCEINLINE T Interlocked::ExchangeAdd (T volatile *addend, T value)
107107{
108108#ifdef _MSC_VER
109109 static_assert (sizeof (long ) == sizeof (T), " Size of long must be the same as size of T" );
@@ -116,7 +116,7 @@ __forceinline T Interlocked::ExchangeAdd(T volatile *addend, T value)
116116}
117117
118118template <typename T>
119- __forceinline T Interlocked::ExchangeAdd64 (T volatile * addend, T value)
119+ FORCEINLINE T Interlocked::ExchangeAdd64 (T volatile * addend, T value)
120120{
121121#ifdef _MSC_VER
122122 static_assert (sizeof (int64_t ) == sizeof (T), " Size of LONGLONG must be the same as size of T" );
@@ -129,7 +129,7 @@ __forceinline T Interlocked::ExchangeAdd64(T volatile* addend, T value)
129129}
130130
131131template <typename T>
132- __forceinline T Interlocked::ExchangeAddPtr (T volatile * addend, T value)
132+ FORCEINLINE T Interlocked::ExchangeAddPtr (T volatile * addend, T value)
133133{
134134#ifdef _MSC_VER
135135#ifdef HOST_64BIT
@@ -151,7 +151,7 @@ __forceinline T Interlocked::ExchangeAddPtr(T volatile* addend, T value)
151151// destination - the first operand and the destination
152152// value - second operand
153153template <typename T>
154- __forceinline void Interlocked::And (T volatile *destination, T value)
154+ FORCEINLINE void Interlocked::And (T volatile *destination, T value)
155155{
156156#ifdef _MSC_VER
157157 static_assert (sizeof (long ) == sizeof (T), " Size of long must be the same as size of T" );
@@ -167,7 +167,7 @@ __forceinline void Interlocked::And(T volatile *destination, T value)
167167// destination - the first operand and the destination
168168// value - second operand
169169template <typename T>
170- __forceinline void Interlocked::Or (T volatile *destination, T value)
170+ FORCEINLINE void Interlocked::Or (T volatile *destination, T value)
171171{
172172#ifdef _MSC_VER
173173 static_assert (sizeof (long ) == sizeof (T), " Size of long must be the same as size of T" );
@@ -185,7 +185,7 @@ __forceinline void Interlocked::Or(T volatile *destination, T value)
185185// Return:
186186// The previous value of the destination
187187template <typename T>
188- __forceinline T Interlocked::ExchangePointer (T volatile * destination, T value)
188+ FORCEINLINE T Interlocked::ExchangePointer (T volatile * destination, T value)
189189{
190190#ifdef _MSC_VER
191191#ifdef HOST_64BIT
@@ -201,7 +201,7 @@ __forceinline T Interlocked::ExchangePointer(T volatile * destination, T value)
201201}
202202
203203template <typename T>
204- __forceinline T Interlocked::ExchangePointer (T volatile * destination, std::nullptr_t value)
204+ FORCEINLINE T Interlocked::ExchangePointer (T volatile * destination, std::nullptr_t value)
205205{
206206#ifdef _MSC_VER
207207#ifdef HOST_64BIT
@@ -225,7 +225,7 @@ __forceinline T Interlocked::ExchangePointer(T volatile * destination, std::null
225225// Return:
226226// The original value of the destination
227227template <typename T>
228- __forceinline T Interlocked::CompareExchangePointer (T volatile *destination, T exchange, T comparand)
228+ FORCEINLINE T Interlocked::CompareExchangePointer (T volatile *destination, T exchange, T comparand)
229229{
230230#ifdef _MSC_VER
231231#ifdef HOST_64BIT
@@ -241,7 +241,7 @@ __forceinline T Interlocked::CompareExchangePointer(T volatile *destination, T e
241241}
242242
243243template <typename T>
244- __forceinline T Interlocked::CompareExchangePointer (T volatile *destination, T exchange, std::nullptr_t comparand)
244+ FORCEINLINE T Interlocked::CompareExchangePointer (T volatile *destination, T exchange, std::nullptr_t comparand)
245245{
246246#ifdef _MSC_VER
247247#ifdef HOST_64BIT
0 commit comments