diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/pure/collections/sets.nim | 2 | ||||
-rwxr-xr-x | lib/pure/collections/tables.nim | 2 | ||||
-rwxr-xr-x | lib/system/channels.nim | 4 |
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) |