summary refs log tree commit diff stats
path: root/lib/system/channels.nim
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/system/channels.nim
parent8178cd4fab0968c1d808b6d3cf56c30c3db7fb37 (diff)
downloadNim-a59abdf8e4d0c85fbcf2b039c46dc98030ffc460.tar.gz
made more tests green; fixes #201
Diffstat (limited to 'lib/system/channels.nim')
-rwxr-xr-xlib/system/channels.nim4
1 files changed, 2 insertions, 2 deletions
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)