summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-08-27 12:29:05 -0600
committerTom Tromey <tromey@redhat.com>2013-08-27 12:29:05 -0600
commit5b05b5a6bc5a3293e692d9db969e8a24aa80f1a6 (patch)
treeab3a9208e5d8168be5d090639cd582e7e0875149
parent545af8557a68f5f34e74349d6dee9d8319df6f7c (diff)
downloademacs-5b05b5a6bc5a3293e692d9db969e8a24aa80f1a6.tar.gz
add a comment before flush_stack_call_func
-rw-r--r--src/alloc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 9b5f2955aa5..5de7d384a49 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -4704,6 +4704,17 @@ mark_stack (char *bottom, char *end)
#endif
}
+/* This is a trampoline function that flushes registers to the stack,
+ and then calls FUNC. ARG is passed through to FUNC verbatim.
+
+ This function must be called whenever Emacs is about to release the
+ global interpreter lock. This lets the garbage collector easily
+ find roots in registers on threads that are not actively running
+ Lisp.
+
+ It is invalid to run any Lisp code or to allocate any GC memory
+ from FUNC. */
+
void
flush_stack_call_func (void (*func) (void *arg), void *arg)
{