diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-06-11 01:25:48 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-11 01:25:48 +0200 |
commit | 61d92920956dc8ebd83017b23def63dbb4aa3c76 (patch) | |
tree | 359352303c36b13a47ec506a8b0b6a9ee417284a /lib/system/threads.nim | |
parent | 61e189792220b7eb3b6a6b2ac543c6de84862aae (diff) | |
parent | 5f2cdcd4fa0f3d5dd0156026c0685aa59d9f7f92 (diff) | |
download | Nim-61d92920956dc8ebd83017b23def63dbb4aa3c76.tar.gz |
fixes merge conflict
Diffstat (limited to 'lib/system/threads.nim')
-rw-r--r-- | lib/system/threads.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/system/threads.nim b/lib/system/threads.nim index 861bde13f..c8ea03f92 100644 --- a/lib/system/threads.nim +++ b/lib/system/threads.nim @@ -116,6 +116,7 @@ when defined(windows): importc: "SetThreadAffinityMask", stdcall, header: "<windows.h>".} elif defined(genode): + import genode/env const GenodeHeader = "genode_cpp/threads.h" type @@ -125,11 +126,12 @@ elif defined(genode): ThreadVarSlot = int proc initThread(s: var SysThread, + env: GenodeEnv, stackSize: culonglong, entry: GenodeThreadProc, arg: pointer, affinity: cuint) {. - importcpp: "#.initThread(genodeEnv, @)".} + importcpp: "#.initThread(@)".} proc threadVarAlloc(): ThreadVarSlot = 0 @@ -569,7 +571,7 @@ when hostOS == "windows": elif defined(genode): var affinityOffset: cuint = 1 - # CPU affinity offset for next thread, safe to roll-over + ## CPU affinity offset for next thread, safe to roll-over proc createThread*[TArg](t: var Thread[TArg], tp: proc (arg: TArg) {.thread, nimcall.}, @@ -580,6 +582,7 @@ elif defined(genode): t.dataFn = tp when hasSharedHeap: t.stackSize = ThreadStackSize t.sys.initThread( + runtimeEnv, ThreadStackSize.culonglong, threadProcWrapper[TArg], addr(t), affinityOffset) inc affinityOffset |