Co-authored-by: drswinghead <drswinghead@gmail.com> Co-authored-by: Clyybber <darkmine956@gmail.com>
This commit is contained in:
parent
d19316bbb9
commit
341cd844b2
2 changed files with 14 additions and 0 deletions
|
|
@ -273,6 +273,9 @@ when nimCoroutines:
|
|||
gch.activeStack = gch.stack.find(bottom)
|
||||
gch.activeStack.setPosition(addr(sp))
|
||||
|
||||
proc GC_getActiveStack() : pointer {.cdecl, exportc.} =
|
||||
return gch.activeStack.bottom
|
||||
|
||||
when not defined(useNimRtl):
|
||||
proc nimGC_setStackBottom(theStackBottom: pointer) =
|
||||
# Initializes main stack of the thread.
|
||||
|
|
@ -300,6 +303,9 @@ when not defined(useNimRtl):
|
|||
else:
|
||||
gch.stack.bottom = cast[pointer](max(a, b))
|
||||
|
||||
when nimCoroutines:
|
||||
if theStackBottom != nil: gch.stack.bottom = theStackBottom
|
||||
|
||||
gch.stack.setPosition(theStackBottom)
|
||||
{.pop.}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue