1 void ThreadPool::get(VM
&vm
, UnstableNode
&dest
){
3 move(dest
,front
->thread
);
4 ThreadList
* nF
=front
->next
;
12 void ThreadPool::schedule(VM
&vm
, UnstableNode
&t
){
13 ThreadList
* l
=vm
.alloc
<ThreadList
>(1);
19 void ThreadPool::gc(GC
&gc
){
21 ThreadList
** n
=&front
;
23 *n
=vm
.alloc
<ThreadList
>(1);
25 new((void*)&((*n
)->thread
)) UnstableNode(gc
,o
->thread
);
31 StackFrameHeader
*& getStackTop(Node
& it
){
32 return ((Thread
*)it
.c
.ptr
)->topOfStack
;
34 void gcIntoThread(Node
& it
, GC
& gc
, Node
& dest
){
35 mkThread(gc
.vm
, dest
);
36 gc
.vm
.gcStack(gc
, getStackTop(it
), getStackTop(dest
));
38 const VTable threadVT
={
39 //PP_VTABLE_DEF(«vtUnimplemented»)
40 //PP_VTABLE_SET(«stackTop»,«&getStackTop»)
41 //PP_VTABLE_SET(«gcInto»,«&gcIntoThread»)
42 //PP_VTABLE_SET(«gc»,«&gcDef<&gcIntoThread>»)