<div class="gmail_quote">
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word">
<div>
<div class="im">
<blockquote type="cite">
<div>What I'm trying to do there is this:</div>
<div> </div>
<div>In the freeze() function, I want to stop executing the current python function, and copy the (python) frame stack, and unroll the python frame stack *and* interpreter level stack frame.</div>
<div> </div>
<div>In the resume() function, I want to continue executing the python function copied in freeze() function and reconstruct interpreter level stack using resume_state_create() and resume_state_invoke() function.</div></blockquote>
<blockquote type="cite">I think you forgot to answer why are you doing it?</blockquote></div></div></div></blockquote>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word">
<div><br></div>
<div>I don't know much about stackless but this seems very similar to what stackless does on pypy (which has stackless at the rpython/interpreter level).</div></div></blockquote>
<div> </div>
<div> </div>
<div>Except that I'm playing with the main thread stack.</div>
<div>I'm just playing with stackless feature, and I see no reason this should not work...</div>
<div> </div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div style="WORD-WRAP: break-word">
<div><span id=""></span></div><br><font color="#888888">
<div><span style="WORD-SPACING: 0px; FONT: 12px Helvetica; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate">
<div style="WORD-WRAP: break-word">
<div>--</div>
<div>Leonardo Santagada</div>
<div>santagada at <a href="http://gmail.com/" target="_blank">gmail.com</a></div>
<div><br></div></div></span><br></div><br></font></div></blockquote></div><br>