diff options
author | Reimer Behrends <behrends@gmail.com> | 2015-09-08 19:01:06 +0200 |
---|---|---|
committer | Reimer Behrends <behrends@gmail.com> | 2015-09-08 19:01:06 +0200 |
commit | 639b5e006992779e8f984eb4a2b1509e4ad2b03a (patch) | |
tree | 90fbdafc8b2084b49c7720360e76815e48ca74dd /compiler/nimblecmd.nim | |
parent | 4baaea5ad52f5a80b2ca5592d2950ed28f7c49dc (diff) | |
download | Nim-639b5e006992779e8f984eb4a2b1509e4ad2b03a.tar.gz |
Properly register threads with the Boehm GC.
In order to be able to scan thread stacks, the Boehm GC needs to know about newly created threads. We establish the end of the stack by using GC_call_with_stack_base (this works properly also with the dual-stack Itanium architecture) and then GC_register_my_thread() to register a thrad and GC_unregister_my_thread() to unregister it again. This patch also includes a modification for the refc and markandsweep collectors to set the stack bottom for thread stacks correctly even if an optimizer aggressively inlines and optimizes procedures (this is already being done for the stack of the main thread). Finally, we use the {.noconv.} pragma for the Boehm GC, as the Boehm API uses no specific calling convention.
Diffstat (limited to 'compiler/nimblecmd.nim')
0 files changed, 0 insertions, 0 deletions