further steps for thread support; bootstrapping should require unzip C sources and ./build.sh

This commit is contained in:
Araq 2011-05-16 00:27:47 +02:00
commit 67a30d8371
21 changed files with 372 additions and 421 deletions

View file

@ -143,8 +143,6 @@ else:
var c = cast[ptr TThreadProcClosure[TParam]](closure)
c.fn(c.data)
{.passL: "-pthread".}
{.passC: "-pthread".}
const
noDeadlocks = true # compileOption("deadlockPrevention")
@ -285,6 +283,7 @@ proc createThread*[TParam](t: var TThread[TParam],
## proc `tp`. `param` is passed to `tp`.
t.c.data = param
t.c.fn = tp
CreateThreadLocalStorage()
when hostOS == "windows":
var dummyThreadId: int32
t.sys = CreateThread(nil, 0'i32, threadProcWrapper[TParam],