# These are six completely ad-hoc operations at the moment.
"""To call just before thread.start_new_thread(). This
allocates a new shadow stack to be used by the future
"""To call whenever the current thread (re-)acquired the GIL.
gc_thread_run._always_inline_ = True
"""To call at the beginning of a new thread.
"""To call just before the final GIL release done by a dying
thread. After a thread_die(), no more gc operation should
gc_thread_die._always_inline_ = True
"""To call just before fork(). Prepares for forking, after
which only the current thread will be alive.
def gc_thread_after_fork(result_of_fork, opaqueaddr):
"""To call just after fork().