#include "internal.h"
#include "vm_core.h"
#include "gc.h"
#include "eval_intern.h"
#include "mjit.h"
#include <unistd.h>
#include <sys/mman.h>
Go to the source code of this file.
|
| | NOINLINE (static VALUE cont_capture(volatile int *volatile stat)) |
| |
| void | rb_fiber_update_self (rb_fiber_t *fiber) |
| |
| void | rb_fiber_mark_self (const rb_fiber_t *fiber) |
| |
| VALUE | rb_obj_is_fiber (VALUE obj) |
| |
| void | rb_fiber_init_mjit_cont (struct rb_fiber_struct *fiber) |
| |
| | NOINLINE (static void fiber_setcontext(rb_fiber_t *new_fiber, rb_fiber_t *old_fiber)) |
| |
| | NOINLINE (NORETURN(static void cont_restore_1(rb_context_t *))) |
| |
| | NORETURN (NOINLINE(static void cont_restore_0(rb_context_t *, VALUE *))) |
| |
| void | ruby_register_rollback_func_for_ensure (e_proc *ensure_func, e_proc *rollback_func) |
| |
| VALUE | rb_fiber_new (rb_block_call_func_t func, VALUE obj) |
| |
| void | rb_fiber_start (void) |
| |
| void | rb_threadptr_root_fiber_setup (rb_thread_t *th) |
| |
| void | rb_threadptr_root_fiber_release (rb_thread_t *th) |
| |
| void | rb_threadptr_root_fiber_terminate (rb_thread_t *th) |
| |
| VALUE | rb_fiber_current (void) |
| |
| VALUE | rb_fiber_transfer (VALUE fiber_value, int argc, const VALUE *argv) |
| |
| void | rb_fiber_close (rb_fiber_t *fiber) |
| |
| VALUE | rb_fiber_resume_kw (VALUE fiber_value, int argc, const VALUE *argv, int kw_splat) |
| |
| VALUE | rb_fiber_resume (VALUE fiber_value, int argc, const VALUE *argv) |
| |
| VALUE | rb_fiber_yield_kw (int argc, const VALUE *argv, int kw_splat) |
| |
| VALUE | rb_fiber_yield (int argc, const VALUE *argv) |
| |
| void | rb_fiber_reset_root_local_storage (rb_thread_t *th) |
| |
| VALUE | rb_fiber_alive_p (VALUE fiber_value) |
| |
| void | Init_Cont (void) |
| |
| RUBY_SYMBOL_EXPORT_BEGIN void | ruby_Init_Continuation_body (void) |
| |
| void | ruby_Init_Fiber_as_Coroutine (void) |
| |
◆ CAPTURE_JUST_VALID_VM_STACK
| #define CAPTURE_JUST_VALID_VM_STACK 1 |
◆ ERRNOMSG
◆ FIBER_CREATED_P
| #define FIBER_CREATED_P |
( |
|
fiber | ) |
((fiber)->status == FIBER_CREATED) |
◆ FIBER_POOL_ALLOCATION_MAXIMUM_SIZE
| #define FIBER_POOL_ALLOCATION_MAXIMUM_SIZE 1024 |
◆ FIBER_POOL_INITIAL_SIZE
| #define FIBER_POOL_INITIAL_SIZE 32 |
◆ FIBER_RESUMED_P
| #define FIBER_RESUMED_P |
( |
|
fiber | ) |
((fiber)->status == FIBER_RESUMED) |
◆ FIBER_RUNNABLE_P
◆ FIBER_STACK_FLAGS
| #define FIBER_STACK_FLAGS (MAP_PRIVATE | MAP_ANON) |
◆ FIBER_SUSPENDED_P
◆ FIBER_TERMINATED_P
◆ PASS_KW_SPLAT
◆ RB_PAGE_MASK
◆ RB_PAGE_SIZE
| #define RB_PAGE_SIZE (pagesize) |
◆ STACK_PAD_SIZE
| #define STACK_PAD_SIZE 1024 |
◆ THREAD_MUST_BE_RUNNING
| #define THREAD_MUST_BE_RUNNING |
( |
|
th | ) |
|
Value:
Definition at line 835 of file cont.c.
◆ e_proc
◆ rb_context_t
◆ context_type
| Enumerator |
|---|
| CONTINUATION_CONTEXT | |
| FIBER_CONTEXT | |
Definition at line 51 of file cont.c.
◆ fiber_status
| Enumerator |
|---|
| FIBER_CREATED | |
| FIBER_RESUMED | |
| FIBER_SUSPENDED | |
| FIBER_TERMINATED | |
Definition at line 213 of file cont.c.
◆ Init_Cont()
◆ NOINLINE() [1/3]
◆ NOINLINE() [2/3]
| NOINLINE |
( |
static VALUE |
cont_capturevolatile int *volatile stat | ) |
|
◆ NOINLINE() [3/3]
| NOINLINE |
( |
static void |
fiber_setcontextrb_fiber_t *new_fiber, rb_fiber_t *old_fiber | ) |
|
◆ NORETURN()
◆ rb_fiber_alive_p()
◆ rb_fiber_close()
◆ rb_fiber_current()
| VALUE rb_fiber_current |
( |
void |
| ) |
|
◆ rb_fiber_init_mjit_cont()
◆ rb_fiber_mark_self()
◆ rb_fiber_new()
◆ rb_fiber_reset_root_local_storage()
| void rb_fiber_reset_root_local_storage |
( |
rb_thread_t * |
th | ) |
|
◆ rb_fiber_resume()
◆ rb_fiber_resume_kw()
◆ rb_fiber_start()
| void rb_fiber_start |
( |
void |
| ) |
|
Definition at line 1805 of file cont.c.
References rb_context_struct::argc, argc, argv, rb_thread_struct::ec, EC_EXEC_TAG, EC_POP_TAG, EC_PUSH_TAG, err, rb_execution_context_struct::errinfo, EXEC_EVENT_HOOK, rb_execution_context_struct::fiber_ptr, FIBER_RESUMED_P, rb_fiber_struct::first_proc, GET_THREAD, GetProcPtr, rb_context_struct::kw_splat, NIL_P, Qfalse, Qnil, RARRAY_CONST_PTR, rb_adjust_argv_kw_splat(), rb_threadptr_pending_interrupt_enque(), rb_vm_invoke_proc(), rb_vm_make_jump_tag_but_local_jump(), rb_vm_proc_local_ep(), rb_execution_context_struct::root_lep, rb_execution_context_struct::root_svar, ruby_current_execution_context_ptr, RUBY_EVENT_FIBER_SWITCH, rb_thread_struct::self, TAG_FATAL, TAG_NONE, TAG_RAISE, TRUE, rb_context_struct::value, VAR_FROM_MEMORY, VM_ASSERT, and VM_BLOCK_HANDLER_NONE.
◆ rb_fiber_transfer()
◆ rb_fiber_update_self()
◆ rb_fiber_yield()
◆ rb_fiber_yield_kw()
◆ rb_obj_is_fiber()
◆ rb_threadptr_root_fiber_release()
| void rb_threadptr_root_fiber_release |
( |
rb_thread_t * |
th | ) |
|
◆ rb_threadptr_root_fiber_setup()
Definition at line 1880 of file cont.c.
References rb_fiber_struct::cont, errno, FIBER_CONTEXT, rb_execution_context_struct::fiber_ptr, MEMZERO, rb_bug(), ruby_mimmalloc(), rb_context_struct::saved_ec, strerror(), rb_execution_context_struct::thread_ptr, and rb_context_struct::type.
◆ rb_threadptr_root_fiber_terminate()
| void rb_threadptr_root_fiber_terminate |
( |
rb_thread_t * |
th | ) |
|
◆ ruby_Init_Continuation_body()
◆ ruby_Init_Fiber_as_Coroutine()
| void ruby_Init_Fiber_as_Coroutine |
( |
void |
| ) |
|
◆ ruby_register_rollback_func_for_ensure()
| void ruby_register_rollback_func_for_ensure |
( |
e_proc * |
ensure_func, |
|
|
e_proc * |
rollback_func |
|
) |
| |