Ruby: internal/cont.h Source File

Ruby 3.2.5p208 (2024-07-26 revision 31d0f1a2e7dbfb60731d1f05b868e1d578cda493)

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// Copy locals from the current execution to the specified fiber.
26 VALUE rb_fiber_inherit_storage(struct rb_execution_context_struct *ec, struct rb_fiber_struct *fiber);
27
28 VALUE rb_fiberptr_self(struct rb_fiber_struct *fiber);
29unsigned int rb_fiberptr_blocking(struct rb_fiber_struct *fiber);
30struct rb_execution_context_struct * rb_fiberptr_get_ec(struct rb_fiber_struct *fiber);
31
32#endif /* INTERNAL_CONT_H */
ruby.h
rb_execution_context_struct
Definition vm_core.h:899
rb_fiber_struct
Definition cont.c:258
rb_thread_struct
Definition vm_core.h:984
VALUE
uintptr_t VALUE
Type that represents a Ruby object.
Definition value.h:40