# atomicStore

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

Atomic store.

Atomically writes `value` to `ptr` with the specified memory ordering.

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

[language/library/src/sync/atomic.ds:218:228](https://github.com/destack-sh/destack/blob/main/language/library/src/sync/atomic.ds#L218-L228)
