move system/atomics out of system; std/atomics should be preferred (#20875)
* move `system/atomics` out of system; `std/atomics` should be preferred * add deprecation message * fixes * fixes * fixes * fixes more tests
This commit is contained in:
parent
8cfce70738
commit
09b7f90475
7 changed files with 23 additions and 17 deletions
|
|
@ -1394,13 +1394,15 @@ when not defined(js) and not defined(booting) and defined(nimTrMacros):
|
|||
swap(cast[ptr pointer](addr arr[a])[], cast[ptr pointer](addr arr[b])[])
|
||||
|
||||
when not defined(nimscript):
|
||||
proc atomicInc*(memLoc: var int, x: int = 1): int {.inline,
|
||||
discardable, raises: [], tags: [], benign.}
|
||||
## Atomic increment of `memLoc`. Returns the value after the operation.
|
||||
{.push stackTrace: off, profiler: off.}
|
||||
|
||||
proc atomicDec*(memLoc: var int, x: int = 1): int {.inline,
|
||||
discardable, raises: [], tags: [], benign.}
|
||||
## Atomic decrement of `memLoc`. Returns the value after the operation.
|
||||
when not defined(nimPreviewSlimSystem):
|
||||
import std/sysatomics
|
||||
export sysatomics
|
||||
else:
|
||||
import std/sysatomics
|
||||
|
||||
{.pop.}
|
||||
|
||||
include "system/memalloc"
|
||||
|
||||
|
|
@ -1617,13 +1619,6 @@ when not defined(nimscript):
|
|||
when not declared(sysFatal):
|
||||
include "system/fatal"
|
||||
|
||||
when not defined(nimscript):
|
||||
{.push stackTrace: off, profiler: off.}
|
||||
|
||||
include "system/atomics"
|
||||
|
||||
{.pop.}
|
||||
|
||||
|
||||
when defined(nimV2):
|
||||
include system/arc
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue