first (non working) implementation of global thread analysis

This commit is contained in:
Araq 2011-06-13 01:40:22 +02:00
commit c019d17561
9 changed files with 338 additions and 97 deletions

View file

@ -347,7 +347,8 @@ proc destroyThread*[TParam](t: var TThread[TParam]) {.inline.} =
proc createThread*[TParam](t: var TThread[TParam],
tp: proc (param: TParam),
param: TParam,
stackSize = 1024*256*sizeof(int)) =
stackSize = 1024*256*sizeof(int)) {.
magic: "CreateThread".} =
## creates a new thread `t` and starts its execution. Entry point is the
## proc `tp`. `param` is passed to `tp`.
t.data = param