1 module core
.thread
.test; // needs access to getStackTop()/getStackBottom()
3 import core
.stdc
.stdio
;
8 void showThreadInfo() nothrow
12 auto top
= getStackTop();
13 auto bottom
= getStackBottom();
14 printf("tlsdata: %p\n", data
.ptr
);
15 printf("stack top: %p\n", getStackTop());
16 printf("stack bottom:%p\n", getStackBottom());
17 printf("used stack: %lld\n", cast(ulong)(bottom
- top
));
30 printf("### thread\n");
31 auto th
= new Thread(&showThreadInfo
, 16384);
35 printf("### lowlevel thread\n");
36 auto llth
= createLowLevelThread(() { showThreadInfo(); });
37 joinLowLevelThread(llth
);