Lines Matching refs:context
23 fcontext_t context; member
37 zend_fiber_context *context = transfer.data; in zend_fiber_trampoline() local
39 context->caller = transfer.context; in zend_fiber_trampoline()
41 context->function(context); in zend_fiber_trampoline()
43 context->self = NULL; in zend_fiber_trampoline()
45 zend_fiber_suspend_context(context); in zend_fiber_trampoline()
50 PHP_FIBER_API zend_bool zend_fiber_init_context(zend_fiber_context *context, zend_fiber_coroutine c… in zend_fiber_init_context() argument
52 if (UNEXPECTED(!zend_fiber_stack_allocate(&context->stack, stack_size))) { in zend_fiber_init_context()
57 void *stack = (void *) ((uintptr_t) context->stack.pointer + context->stack.size); in zend_fiber_init_context()
59 context->self = make_fcontext(stack, context->stack.size, zend_fiber_trampoline); in zend_fiber_init_context()
61 if (UNEXPECTED(!context->self)) { in zend_fiber_init_context()
62 zend_fiber_stack_free(&context->stack); in zend_fiber_init_context()
66 context->function = coroutine; in zend_fiber_init_context()
67 context->caller = NULL; in zend_fiber_init_context()
72 PHP_FIBER_API void zend_fiber_destroy_context(zend_fiber_context *context) in zend_fiber_destroy_context() argument
74 zend_fiber_stack_free(&context->stack); in zend_fiber_destroy_context()
83 to->self = transfer.context; in zend_fiber_switch_context()
92 current->caller = transfer.context; in zend_fiber_suspend_context()