Files
GS13NG/datum/stack_end_detector.html
2025-02-05 06:19:18 +00:00

6 lines
2.5 KiB
HTML

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><base href="../"><link rel="stylesheet" href="dmdoc.css"><title>/datum/stack_end_detector - /tg/ Station 13</title></head><body><header><a href="index.html">/tg/ Station 13</a> - <a href="index.html#modules">Modules</a> - <a href="index.html#types">Types</a><a href="datum/stack_end_detector.html#proc">Proc Details</a></header><main><h1>stack_end_detector <aside>/<a href="datum.html">datum</a>/<a href="datum/stack_end_detector.html">stack_end_detector</a></aside> <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/helper_datums/stack_end_detector.dm#L6"><img src="git.png" width="16" height="16" title="code/datums/helper_datums/stack_end_detector.dm 6"></a></h1><p>Stack End Detector.
Can detect if a given code stack has exited, used by the mc for stack overflow detection.</p><table class="summary" cellspacing="0"><tr><td colspan="2"><h2>Procs</h2></td></tr><tr><th><a href="datum/stack_end_detector.html#proc/check">check</a></th><td>Returns true if the stack is still going. Calling before the canary has been primed also returns true</td></tr><tr><th><a href="datum/stack_end_detector.html#proc/prime_canary">prime_canary</a></th><td></td></tr></table><h2 id="proc">Proc Details</h2><h3 id="proc/check"><aside class="declaration">proc </aside>check<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/helper_datums/stack_end_detector.dm#L25"><img src="git.png" width="16" height="16" title="code/datums/helper_datums/stack_end_detector.dm 25"></a></aside></h3><p>Returns true if the stack is still going. Calling before the canary has been primed also returns true</p><h3 id="proc/prime_canary"><aside class="declaration">proc </aside>prime_canary<aside>() <a href="https://github.com/evilew/GS13-Citadel/blob/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e/code/datums/helper_datums/stack_end_detector.dm#L18"><img src="git.png" width="16" height="16" title="code/datums/helper_datums/stack_end_detector.dm 18"></a></aside></h3><ul>
<li>Prime the stack overflow detector.
Store the return value of this proc call in a proc level var.
Can only be called once.</li>
</ul></main><footer>tgstation.dme <a href="https://github.com/evilew/GS13-Citadel/tree/e8e0068531dd988f9e65b33ae7866d4fbf1fdd9e">e8e0068</a> (master) — <a href="https://github.com/SpaceManiac/SpacemanDMM/blob/master/crates/dmdoc/README.md">dmdoc 1.9.0</a></footer></body></html>