blob: 17b71dd0f025955b3b77d14667990a7b6fd8a8ec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "Cmm.h"
stg_cloneMyStackzh () {
gcptr stgStack;
gcptr clonedStack;
stgStack = StgTSO_stackobj(CurrentTSO);
StgStack_sp(stgStack) = Sp;
("ptr" clonedStack) = ccall cloneStack(MyCapability() "ptr", stgStack "ptr");
return (clonedStack);
}
stg_sendCloneStackMessagezh (gcptr threadId, gcptr mVarStablePtr) {
ccall sendCloneStackMessage(threadId "ptr", mVarStablePtr "ptr");
return ();
}
stg_decodeStackzh (gcptr stgStack) {
gcptr stackEntries;
("ptr" stackEntries) = ccall decodeClonedStack(MyCapability() "ptr", stgStack "ptr");
return (stackEntries);
}
|