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:
ringabout 2022-11-23 03:39:30 +08:00 • committed by GitHub
commit 09b7f90475
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 17 deletions

View file

@ -23,7 +23,7 @@ when not compileOption("threads"):
import cpuinfo, cpuload, locks, os
when defined(nimPreviewSlimSystem):
import std/[assertions, typedthreads]
import std/[assertions, typedthreads, sysatomics]
{.push stackTrace:off.}

View file

@ -24,7 +24,7 @@ when defined(nimHasUsed):
import hashes, algorithm, strutils, tables, sets
when defined(nimPreviewSlimSystem):
import std/syncio
import std/[syncio, sysatomics]
when not defined(memProfiler):
include "system/timers"

View file

@ -17,6 +17,9 @@
import hashes, times, endians, random
from std/private/decode_helpers import handleHexChar
when defined(nimPreviewSlimSystem):
import std/sysatomics
type
Oid* = object ## An OID.
time: int64