summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2011-05-09 22:29:29 +0200
committerAraq <rumpf_a@web.de>2011-05-09 22:29:29 +0200
commitf717f1e628782cc54a69ce589249d694a77015bb (patch)
treefc6346759e2a5b039f6a5333f5774baf7e81366c /lib/system.nim
parentd2e2d71d05b9a8381bf7fef7bb23da029e576c2a (diff)
downloadNim-f717f1e628782cc54a69ce589249d694a77015bb.tar.gz
threadvar alternative
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-xlib/system.nim16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/system.nim b/lib/system.nim
index 93895605c..05e934d01 100755
--- a/lib/system.nim
+++ b/lib/system.nim
@@ -779,6 +779,14 @@ proc compileOption*(option, arg: string): bool {.
 include "system/inclrtl"
 
 when not defined(ecmascript) and not defined(nimrodVm):
+
+  proc atomicInc*(memLoc: var int, x: int): int {.inline.}
+    ## atomic increment of `memLoc`. Returns the value after the operation.
+  
+  proc atomicDec*(memLoc: var int, x: int): int {.inline.}
+    ## atomic decrement of `memLoc`. Returns the value after the operation.
+
+  include "system/systhread"
   include "system/cgprocs"
 
 proc add *[T](x: var seq[T], y: T) {.magic: "AppendSeqElem", noSideEffect.}
@@ -1436,12 +1444,6 @@ proc quit*(errorcode: int = QuitSuccess) {.
 
 when not defined(EcmaScript) and not defined(NimrodVM):
 
-  proc atomicInc*(memLoc: var int, x: int): int {.inline.}
-    ## atomic increment of `memLoc`. Returns the value after the operation.
-  
-  proc atomicDec*(memLoc: var int, x: int): int {.inline.}
-    ## atomic decrement of `memLoc`. Returns the value after the operation.
-
   proc initGC()
 
   proc initStackBottom() {.inline.} = 
@@ -1707,7 +1709,7 @@ when not defined(EcmaScript) and not defined(NimrodVM):
     else:
       result = n.sons[n.len]
 
-  include "system/systhread"
+  #include "system/systhread"
   include "system/mmdisp"
   include "system/sysstr"
   include "system/assign"