# atomicFetchUmax

`import { atomicFetchUmax } from "destack:sync";`

Atomic fetch-and-max (unsigned).

Atomically stores the unsigned maximum of the current value and `value`.
Returns the previous value before the operation.

```ds title="atomicFetchUmax"
export declare function atomicFetchUmax<T: Integer>(ptr: *T, value: T, order: MemoryOrdering, scope: AtomicScope, memoryScope: MemoryScope, regions: MemoryRegionSet, isVolatile: boolean, isMakeAvailable: boolean, isMakeVisible: boolean): T
```

[language/library/src/sync/atomic.ds:424:434](https://github.com/destack-sh/destack/blob/main/language/library/src/sync/atomic.ds#L424-L434)
