Resolve cross file resolution errors in atomics (#19422) [backport:1.6]

* Resolve call undeclared routine testAndSet

* Fix undeclared field atomicType
This commit is contained in:
James 2022-01-20 04:58:59 -08:00 • committed by GitHub
commit 851e515bba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 10 deletions

View file

@ -0,0 +1,9 @@
import atomics
type
AtomicWithGeneric*[T] = object
value: Atomic[T]
proc initAtomicWithGeneric*[T](value: T): AtomicWithGeneric[T] =
result.value.store(value)