/ext-fiber/src/ |
H A D | fiber_stack.c | 58 bool zend_fiber_stack_allocate(zend_fiber_stack *stack, size_t size) in zend_fiber_stack_allocate() argument 65 stack->size = (size + page_size - 1) / page_size * page_size; in zend_fiber_stack_allocate() 66 const size_t msize = stack->size + ZEND_FIBER_GUARD_PAGES * page_size; in zend_fiber_stack_allocate() 98 stack->pointer = (void *) ((uintptr_t) pointer + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_allocate() 101 uintptr_t base = (uintptr_t) stack->pointer; in zend_fiber_stack_allocate() 102 stack->valgrind = VALGRIND_STACK_REGISTER(base, base + stack->size); in zend_fiber_stack_allocate() 108 void zend_fiber_stack_free(zend_fiber_stack *stack) in zend_fiber_stack_free() argument 110 if (!stack->pointer) { in zend_fiber_stack_free() 115 VALGRIND_STACK_DEREGISTER(stack->valgrind); in zend_fiber_stack_free() 125 munmap(pointer, stack->size + ZEND_FIBER_GUARD_PAGES * page_size); in zend_fiber_stack_free() [all …]
|
H A D | fiber_asm.c | 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() local 59 context->self = make_fcontext(stack, context->stack.size, zend_fiber_trampoline); in zend_fiber_init_context() 62 zend_fiber_stack_free(&context->stack); in zend_fiber_init_context() 74 zend_fiber_stack_free(&context->stack); in zend_fiber_destroy_context() 79 ZEND_ASSERT(to && to->self && to->stack.pointer && "Invalid fiber context"); in zend_fiber_switch_context() 88 ZEND_ASSERT(current && current->caller && current->stack.pointer && "Invalid fiber context"); in zend_fiber_suspend_context()
|
H A D | fiber.c | 42 stack = EG(vm_stack); \ 43 stack->top = EG(vm_stack_top); \ 44 stack->end = EG(vm_stack_end); \ 53 EG(vm_stack) = stack; \ 54 EG(vm_stack_top) = stack->top; \ 55 EG(vm_stack_end) = stack->end; \ 96 zend_vm_stack stack; in zend_fiber_suspend() local 113 zend_vm_stack stack; in zend_fiber_switch_to() local 167 EG(vm_stack) = stack; in zend_fiber_execute() 168 EG(vm_stack_top) = stack->top + ZEND_CALL_FRAME_SLOT; in zend_fiber_execute() [all …]
|
/ext-fiber/boost/asm/ |
H A D | make_arm_aapcs_pe_armasm.asm | 34 ; first arg of make_fcontext() == top of context-stack 35 ; save top of context-stack (base) A4 41 ; reserve space for context-data on context-stack 46 ; second arg of make_fcontext() == size of context-stack 47 ; compute bottom address of context-stack (limit) 49 ; save bottom address of context-stack as 'limit' 51 ; save bottom address of context-stack as 'dealloction stack'
|
H A D | jump_ppc32_sysv_elf_gas.S | 66 stwu %r1, -240(%r1) # allocate stack space, R1 % 16 == 0 184 # adjust stack 201 .section .note.GNU-stack,"",%progbits
|
H A D | jump_i386_ms_pe_masm.asm | 28 ; prepare stack 45 ; load current deallocation stack 48 ; load current stack limit 51 ; load current stack base 86 ; restore current deallocation stack 89 ; restore current stack limit 92 ; restore current stack base 106 ; prepare stack
|
H A D | make_ppc32_sysv_xcoff_gas.S | 90 # reserve space for context-data on context-stack 129 # save return address on stack, set up stack frame 131 # allocate stack space, R1 % 16 == 0
|
H A D | make_ppc64_sysv_xcoff_gas.S | 20 # reserve space for context-data on context-stack 59 # save return address on stack, set up stack frame 61 # allocate stack space, R1 % 16 == 0
|
H A D | make_ppc64_sysv_elf_gas.S | 102 # first arg of make_fcontext() == top address of context-stack 106 # reserve space for context-data on context-stack 156 # save return address on stack, set up stack frame 158 # allocate stack space, R1 % 16 == 0 177 .section .note.GNU-stack,"",%progbits
|
H A D | make_ppc32_sysv_macho_gas.S | 87 # reserve space for context-data on context-stack 129 # save return address on stack, set up stack frame 131 # allocate stack space, R1 16 == 0
|
H A D | make_i386_ms_pe_masm.asm | 30 ; first arg of make_fcontext() == top of context-stack 40 ; reserve space for context-data on context-stack 50 ; first arg of make_fcontext() == top of context-stack 52 ; save top address of context stack as 'base' 54 ; second arg of make_fcontext() == size of context-stack 56 ; negate stack size for LEA instruction (== substraction) 58 ; compute bottom address of context stack (limit) 60 ; save bottom address of context-stack as 'limit' 62 ; save bottom address of context-stack as 'dealloction stack'
|
H A D | make_mips64_n64_elf_gas.S | 64 # reserve space for context-data on context-stack 88 # area on the stack which we reuse for calling _exit 96 .section .note.GNU-stack,"",%progbits
|
H A D | make_arm64_aapcs_macho_gas.S | 59 ; shift address in x0 (allocated stack) to lower 16 byte boundary 62 ; reserve space for context-data on context-stack
|
H A D | jump_x86_64_ms_pe_masm.asm | 90 ; prepare stack 116 ; save current deallocation stack 119 ; save current stack limit 122 ; save current stack base 166 ; restore current deallocation stack 169 ; restore current stack limit 172 ; restore current stack base 187 ; prepare stack
|
H A D | make_arm64_aapcs_elf_gas.S | 60 # shift address in x0 (allocated stack) to lower 16 byte boundary 63 # reserve space for context-data on context-stack
|
H A D | make_riscv64_sysv_elf_gas.S | 66 # shift address in a0 (allocated stack) to lower 16 byte boundary 69 # reserve space for context-data on context-stack
|
H A D | make_mips32_o32_elf_gas.S | 57 # reserve space for context-data on context-stack 89 # area on the stack which we reuse for calling _exit 97 .section .note.GNU-stack,"",%progbits
|
H A D | jump_arm_aapcs_elf_gas.S | 53 @ prepare stack for FPU 70 @ prepare stack for FPU
|
H A D | jump_arm_aapcs_macho_gas.S | 59 @ prepare stack for FPU 76 @ prepare stack for FPU
|
H A D | make_s390x_sysv_elf_gas.S | 108 .section .note.GNU-stack,"",%progbits
|
H A D | jump_arm64_aapcs_macho_gas.S | 58 ; prepare stack for GP + FPU 106 ; restore stack from GP + FPU
|
H A D | make_x86_64_sysv_elf_gas.S | 82 .section .note.GNU-stack,"",%progbits
|
H A D | jump_arm64_aapcs_elf_gas.S | 60 # prepare stack for GP + FPU 108 # restore stack from GP + FPU
|
H A D | jump_mips32_o32_elf_gas.S | 48 # reserve space on stack 103 # adjust stack 119 .section .note.GNU-stack,"",%progbits
|
/ext-fiber/ |
H A D | fiber.h | 59 zend_fiber_stack stack; member 128 zend_bool zend_fiber_stack_allocate(zend_fiber_stack *stack, size_t size); 129 void zend_fiber_stack_free(zend_fiber_stack *stack);
|