[format minor] remove unnecessary spaces (#19216)

This commit is contained in:
flywind 2021-12-07 01:58:01 +08:00 • committed by GitHub
commit 7e3da693f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ when someGcc and hasThreadSupport:
proc atomicCompareExchangeN*[T: AtomType](p, expected: ptr T, desired: T, proc atomicCompareExchangeN*[T: AtomType](p, expected: ptr T, desired: T,
weak: bool, success_memmodel: AtomMemModel, failure_memmodel: AtomMemModel): bool {. weak: bool, success_memmodel: AtomMemModel, failure_memmodel: AtomMemModel): bool {.
importc: "__atomic_compare_exchange_n ", nodecl.} importc: "__atomic_compare_exchange_n", nodecl.}
## This proc implements an atomic compare and exchange operation. This compares the ## This proc implements an atomic compare and exchange operation. This compares the
## contents at p with the contents at expected and if equal, writes desired at p. ## contents at p with the contents at expected and if equal, writes desired at p.
## If they are not equal, the current contents at p is written into expected. ## If they are not equal, the current contents at p is written into expected.
@ -100,13 +100,13 @@ when someGcc and hasThreadSupport:
proc atomicSubFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {. proc atomicSubFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
importc: "__atomic_sub_fetch", nodecl.} importc: "__atomic_sub_fetch", nodecl.}
proc atomicOrFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {. proc atomicOrFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
importc: "__atomic_or_fetch ", nodecl.} importc: "__atomic_or_fetch", nodecl.}
proc atomicAndFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {. proc atomicAndFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
importc: "__atomic_and_fetch", nodecl.} importc: "__atomic_and_fetch", nodecl.}
proc atomicXorFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {. proc atomicXorFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
importc: "__atomic_xor_fetch", nodecl.} importc: "__atomic_xor_fetch", nodecl.}
proc atomicNandFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {. proc atomicNandFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
importc: "__atomic_nand_fetch ", nodecl.} importc: "__atomic_nand_fetch", nodecl.}
## Perform the operation return the old value, all memory models are valid ## Perform the operation return the old value, all memory models are valid
proc atomicFetchAdd*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {. proc atomicFetchAdd*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.