Merge branch 'devel' into araq

This commit is contained in:
Andreas Rumpf 2017-04-04 13:38:41 +02:00
commit bfaa329680
2 changed files with 22 additions and 5 deletions

View file

@ -13,7 +13,6 @@
#define _GENODE_CPP__THREAD_H_
#include <base/thread.h>
#include <util/avl_tree.h>
#include <util/reconstructible.h>
namespace Nim { struct SysThread; }

View file

@ -593,6 +593,8 @@ elif defined(genode):
proc createThread*[TArg](t: var Thread[TArg],
tp: proc (arg: TArg) {.thread, nimcall.},
param: TArg) =
t.core = cast[PGcThread](allocShared0(sizeof(GcThread)))
when TArg isnot void: t.data = param
t.dataFn = tp
when hasSharedHeap: t.stackSize = ThreadStackSize