Skip to content

Commit

Permalink
[format minor] remove unnecessary spaces (nim-lang#19216)
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored and PMunch committed Mar 28, 2022
1 parent 2ec0d2b commit 76904ae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/system/atomics.nim
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ when someGcc and hasThreadSupport:

proc atomicCompareExchangeN*[T: AtomType](p, expected: ptr T, desired: T,
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
## 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.
Expand All @@ -100,13 +100,13 @@ when someGcc and hasThreadSupport:
proc atomicSubFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
importc: "__atomic_sub_fetch", nodecl.}
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 {.
importc: "__atomic_and_fetch", nodecl.}
proc atomicXorFetch*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
importc: "__atomic_xor_fetch", nodecl.}
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
proc atomicFetchAdd*[T: AtomType](p: ptr T, val: T, mem: AtomMemModel): T {.
Expand Down Expand Up @@ -177,8 +177,8 @@ elif someVcc and hasThreadSupport:

proc `==`(x1, x2: AtomMemModel): bool {.borrow.}

proc readBarrier() {.importc: "_ReadBarrier", header: "<intrin.h>".}
proc writeBarrier() {.importc: "_WriteBarrier", header: "<intrin.h>".}
proc readBarrier() {.importc: "_ReadBarrier", header: "<intrin.h>".}
proc writeBarrier() {.importc: "_WriteBarrier", header: "<intrin.h>".}
proc fence*() {.importc: "_ReadWriteBarrier", header: "<intrin.h>".}

template barrier(mem: AtomMemModel) =
Expand Down

0 comments on commit 76904ae

Please sign in to comment.