InterlockedAnd
Bitwise and as an atomic operation.
Read time 2 minutesLast updated 8 days ago
Definition
- Type: Method
- Namespace: Unity.Burst.Intrinsics
- Assembly: UnityEngine.BurstModule
InterlockedAnd(int, int)
Bitwise and as an atomic operation.
public static int InterlockedAnd(ref int location, int value)
Parameters
Returns
Type | Description |
|---|---|
| int | The original value in |
Remarks
Using the return value of this intrinsic may result in worse code-generation on some platforms (a compare-exchange loop), rather than a single atomic instruction being generated.
Additional Resources: https://docs.microsoft.com/en-us/dotnet/api/system.threading.interlocked.and
InterlockedAnd(uint, uint)
Bitwise and as an atomic operation.
public static uint InterlockedAnd(ref uint location, uint value)
Parameters
Returns
Type | Description |
|---|---|
| uint | The original value in |
Remarks
Using the return value of this intrinsic may result in worse code-generation on some platforms (a compare-exchange loop), rather than a single atomic instruction being generated.
Additional Resources: https://docs.microsoft.com/en-us/dotnet/api/system.threading.interlocked.and
InterlockedAnd(long, long)
Bitwise and as an atomic operation.
public static long InterlockedAnd(ref long location, long value)
Parameters
Returns
Type | Description |
|---|---|
| long | The original value in |
Remarks
Using the return value of this intrinsic may result in worse code-generation on some platforms (a compare-exchange loop), rather than a single atomic instruction being generated.
Additional Resources: https://docs.microsoft.com/en-us/dotnet/api/system.threading.interlocked.and
InterlockedAnd(ulong, ulong)
Bitwise and as an atomic operation.
public static ulong InterlockedAnd(ref ulong location, ulong value)
Parameters
Returns
Type | Description |
|---|---|
| ulong | The original value in |
Remarks
Using the return value of this intrinsic may result in worse code-generation on some platforms (a compare-exchange loop), rather than a single atomic instruction being generated.
Additional Resources: https://docs.microsoft.com/en-us/dotnet/api/system.threading.interlocked.and