summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-09-12 21:48:37 +0200
committerAraq <rumpf_a@web.de>2012-09-12 21:48:37 +0200
commita59abdf8e4d0c85fbcf2b039c46dc98030ffc460 (patch)
tree5e4eeb69d3fe050833f3abf7d398de9034a3faa2 /lib
parent8178cd4fab0968c1d808b6d3cf56c30c3db7fb37 (diff)
downloadNim-a59abdf8e4d0c85fbcf2b039c46dc98030ffc460.tar.gz
made more tests green; fixes #201
Diffstat (limited to 'lib')
-rwxr-xr-xlib/pure/collections/sets.nim2
-rwxr-xr-xlib/pure/collections/tables.nim2
-rwxr-xr-xlib/system/channels.nim4
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/collections/sets.nim b/lib/pure/collections/sets.nim
index ff2ffec0e..42b77d427 100755
--- a/lib/pure/collections/sets.nim
+++ b/lib/pure/collections/sets.nim
@@ -157,7 +157,7 @@ proc card*[A](s: TOrderedSet[A]): int {.inline.} =
   ## alias for `len`.
   result = s.counter
 
-template forAllOrderedPairs(yieldStmt: stmt) {.dirty.} =
+template forAllOrderedPairs(yieldStmt: stmt) {.dirty, immediate.} =
   var h = s.first
   while h >= 0:
     var nxt = s.data[h].next
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim
index 3ae25d3ad..3b252f1d2 100755
--- a/lib/pure/collections/tables.nim
+++ b/lib/pure/collections/tables.nim
@@ -202,7 +202,7 @@ proc len*[A, B](t: TOrderedTable[A, B]): int {.inline.} =
   ## returns the number of keys in `t`.
   result = t.counter
 
-template forAllOrderedPairs(yieldStmt: stmt) {.dirty.} =
+template forAllOrderedPairs(yieldStmt: stmt) {.dirty, immediate.} =
   var h = t.first
   while h >= 0:
     var nxt = t.data[h].next
diff --git a/lib/system/channels.nim b/lib/system/channels.nim
index 617dddb7e..13d751d80 100755
--- a/lib/system/channels.nim
+++ b/lib/system/channels.nim
@@ -180,12 +180,12 @@ proc rawRecv(q: PRawChannel, data: pointer, typ: PNimType) =
   storeAux(data, addr(q.data[q.rd * typ.size]), typ, q, mLoad)

   q.rd = (q.rd + 1) and q.mask

 

-template lockChannel(q: expr, action: stmt) =

+template lockChannel(q: expr, action: stmt) {.immediate.} =

   acquireSys(q.lock)

   action

   releaseSys(q.lock)

 

-template sendImpl(q: expr) =  

+template sendImpl(q: expr) {.immediate.} =  

   if q.mask == ChannelDeadMask:

     raise newException(EDeadThread, "cannot send message; thread died")

   acquireSys(q.lock)