Types
GcThread {.pure, inheritable.} = object when emulatedThreadVars: tls*: ThreadLocalStorage else: nil when hasSharedHeap: next*, prev*: PGcThread stackBottom*, stackTop*: pointer stackSize*: int else: nil
- Source Edit
Thread[TArg] = object core*: PGcThread sys*: SysThread when TArg is void: dataFn*: proc () {.nimcall, ...gcsafe.} else: dataFn*: proc (m: TArg) {.nimcall, ...gcsafe.} data*: TArg when hasAllocStack: rawStack*: pointer
- Source Edit
ThreadLocalStorage = array[0 .. (nimTlsSize div 8), float]
- Source Edit
WinThreadProc = proc (x: pointer): int32 {.stdcall.}
- Source Edit
Consts
emulatedThreadVars = false
- Source Edit
hasAllocStack = false
- Source Edit
Procs
proc createThread(lpThreadAttributes: pointer; dwStackSize: int32; lpStartAddress: WinThreadProc; lpParameter: pointer; dwCreationFlags: int32; lpThreadId: var int32): SysThread {. stdcall, dynlib: "kernel32", importc: "CreateThread", ...raises: [], tags: [], forbids: [].}
- Source Edit
proc setThreadAffinityMask(hThread: SysThread; dwThreadAffinityMask: uint) {. importc: "SetThreadAffinityMask", stdcall, header: "<windows.h>", ...raises: [], tags: [], forbids: [].}
- Source Edit
proc winResumeThread(hThread: SysThread): int32 {.stdcall, dynlib: "kernel32", importc: "ResumeThread", ...raises: [], tags: [], forbids: [].}
- Source Edit
proc winSuspendThread(hThread: SysThread): int32 {.stdcall, dynlib: "kernel32", importc: "SuspendThread", ...raises: [], tags: [], forbids: [].}
- Source Edit