diff options
author | Araq <rumpf_a@web.de> | 2011-05-17 23:43:46 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-05-17 23:43:46 +0200 |
commit | 9b460a71cef95cea944d637b7e8bb6c785317a34 (patch) | |
tree | 6e47b6efd749c2aadd0ea2db599fca6ae9c43c5e /lib/system | |
parent | b0b2c233aedb7a475c0d918d7747c3ad942bb75f (diff) | |
download | Nim-9b460a71cef95cea944d637b7e8bb6c785317a34.tar.gz |
threads with --gc:boehm may work now :-)
Diffstat (limited to 'lib/system')
-rwxr-xr-x | lib/system/excpt.nim | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/system/excpt.nim b/lib/system/excpt.nim index dac5678e0..01604b2c9 100755 --- a/lib/system/excpt.nim +++ b/lib/system/excpt.nim @@ -67,7 +67,7 @@ when hasThreadSupport: type Tpthread_key {.importc: "pthread_key_t", - header: "<sys/types.h>".} = distinct int + header: "<sys/types.h>".} = distinct int32 TThreadVarSlot {.compilerproc.} = Tpthread_key proc pthread_getspecific(a1: Tpthread_key): pointer {. @@ -111,9 +111,9 @@ when hasThreadSupport: # it's more efficient to not use a global variable for the thread storage # slot, but to rely on the implementation to assign slot 0 for us... ;-) - var checkSlot = ThreadVarAlloc() - const globalsSlot = TThreadVarSlot(0) - assert checkSlot.int == globalsSlot.int + var globalsSlot = ThreadVarAlloc() + #const globalsSlot = TThreadVarSlot(0) + #assert checkSlot.int == globalsSlot.int proc AtomicAlloc0(size: int): pointer = #AquireSys(heapLock) @@ -145,7 +145,6 @@ when hasThreadSupport: var globals = GetGlobals() template `||`(varname: expr): expr = globals.varname - #ThreadGlobals() else: template ThreadGlobals = nil # nothing template `||`(varname: expr): expr = varname |