summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-08 11:19:15 +0100
committerAraq <rumpf_a@web.de>2014-11-08 11:19:15 +0100
commit511111defa982ce3d2926ab2c20fff43a5eede1d (patch)
tree919dcfa6b531c0c4e79c9ff9b5d6b7fca19b72ea /lib
parent943d4ee71448f7efd2a7feb1126a401f68573979 (diff)
downloadNim-511111defa982ce3d2926ab2c20fff43a5eede1d.tar.gz
TAtomType includes 'bool'
Diffstat (limited to 'lib')
-rw-r--r--lib/system/atomics.nim10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/system/atomics.nim b/lib/system/atomics.nim
index 5e5c72fae..f816c8201 100644
--- a/lib/system/atomics.nim
+++ b/lib/system/atomics.nim
@@ -37,7 +37,7 @@ when someGcc and hasThreadSupport:
     ## and release stores in all threads.
 
   type
-    TAtomType* = TNumber|pointer|ptr|char
+    TAtomType* = SomeNumber|pointer|ptr|char|bool
       ## Type Class representing valid types for use with atomic procs
 
   proc atomicLoadN*[T: TAtomType](p: ptr T, mem: AtomMemModel): T {.
@@ -204,16 +204,16 @@ else:
 
 
 when (defined(x86) or defined(amd64)) and someGcc:
-  proc cpuRelax {.inline.} =
+  proc cpuRelax* {.inline.} =
     {.emit: """asm volatile("pause" ::: "memory");""".}
 elif (defined(x86) or defined(amd64)) and defined(vcc):
-  proc cpuRelax {.importc: "YieldProcessor", header: "<windows.h>".}
+  proc cpuRelax* {.importc: "YieldProcessor", header: "<windows.h>".}
 elif defined(icl):
-  proc cpuRelax {.importc: "_mm_pause", header: "xmmintrin.h".}
+  proc cpuRelax* {.importc: "_mm_pause", header: "xmmintrin.h".}
 elif false:
   from os import sleep
 
-  proc cpuRelax {.inline.} = os.sleep(1)
+  proc cpuRelax* {.inline.} = os.sleep(1)
 
 when not declared(fence) and hasThreadSupport:
   # XXX fixme