Struct UnsafeAtomicCounter64
A 64-bit atomic counter.
Namespace: Unity.Collections.LowLevel.Unsafe
Assembly: solution.dll
Syntax
public struct UnsafeAtomicCounter64
Remarks
Rather than have its own long, a counter points to a long. This arrangement lets counters in different jobs share reference to the same underlying long.
Constructors
| Name | Description |
|---|---|
| UnsafeAtomicCounter64(void*) | Initializes and returns an instance of UnsafeAtomicCounter64. |
Fields
| Name | Description |
|---|---|
| Counter | The long that is modified by this counter. |
Methods
| Name | Description |
|---|---|
| Add(long) | Atomically adds a value to this counter. |
| AddSat(long, long) | Atomically adds a value to this counter. The result will not be greater than a maximum value. |
| Reset(long) | Non-atomically sets this counter to a value. |
| Sub(long) | Atomically subtracts a value from this counter. |
| SubSat(long, long) | Atomically subtracts a value from this counter. The result will not be less than a minimum value. |