Ruby: internal/cont.h Source File

Ruby 4.0.6p0 (2026-07-14 revision 03b6d3f8898a28604fe6cb00eae3226b821168f4)

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.
29 VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb_fiber_struct *fiber);
30
31 VALUE 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#endif /* INTERNAL_CONT_H */
ruby.h
rb_execution_context_struct
Definition vm_core.h:1034
rb_fiber_struct
Definition cont.c:258
rb_thread_struct
Definition vm_core.h:1131
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40