Ruby 3.5.0dev (2025-01-10 revision 5fab31b15e32622c4b71d1d347a41937e9f9c212)
cont.h
1#ifndef INTERNAL_CONT_H /*-*-C-*-vi:se ft=c:*/
2#define INTERNAL_CONT_H
11#include "ruby/ruby.h" /* for VALUE */
12#include "iseq.h"
13
14struct rb_thread_struct; /* in vm_core.h */
15struct rb_fiber_struct; /* in cont.c */
16struct rb_execution_context_struct; /* in vm_core.c */
17
18/* cont.c */
19void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
20void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
21void rb_jit_cont_init(void);
22void rb_jit_cont_each_iseq(rb_iseq_callback callback, void *data);
23void rb_jit_cont_finish(void);
24
25/* vm.c */
26void rb_free_shared_fiber_pool(void);
27
28// Copy locals from the current execution to the specified fiber.
29VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb_fiber_struct *fiber);
30
31VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
32unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber);
33struct rb_execution_context_struct * rb_fiberptr_get_ec(struct rb_fiber_struct *fiber);
34
35#endif /* INTERNAL_CONT_H */
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40