… | |
… | |
86 | volatile coro_func func = coro_init_func; |
86 | volatile coro_func func = coro_init_func; |
87 | volatile void *arg = coro_init_arg; |
87 | volatile void *arg = coro_init_arg; |
88 | |
88 | |
89 | coro_transfer (new_coro, create_coro); |
89 | coro_transfer (new_coro, create_coro); |
90 | |
90 | |
91 | #if __linux && __amd64 |
91 | #if __GCC_HAVE_DWARF2_CFI_ASM && __amd64 |
92 | /* we blindly assume on any __linux with __amd64 we have a new enough gas with .cfi_undefined support */ |
|
|
93 | asm (".cfi_undefined rip"); |
92 | asm (".cfi_undefined rip"); |
94 | #endif |
93 | #endif |
95 | |
94 | |
96 | func ((void *)arg); |
95 | func ((void *)arg); |
97 | |
96 | |
… | |
… | |
437 | |
436 | |
438 | pthread_attr_init (&attr); |
437 | pthread_attr_init (&attr); |
439 | #if __UCLIBC__ |
438 | #if __UCLIBC__ |
440 | /* exists, but is borked */ |
439 | /* exists, but is borked */ |
441 | /*pthread_attr_setstacksize (&attr, (size_t)ssize);*/ |
440 | /*pthread_attr_setstacksize (&attr, (size_t)ssize);*/ |
|
|
441 | #elif __CYGWIN__ |
|
|
442 | /* POSIX, not here */ |
|
|
443 | pthread_attr_setstacksize (&attr, (size_t)ssize); |
442 | #else |
444 | #else |
443 | pthread_attr_setstack (&attr, sptr, (size_t)ssize); |
445 | pthread_attr_setstack (&attr, sptr, (size_t)ssize); |
444 | #endif |
446 | #endif |
445 | pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS); |
447 | pthread_attr_setscope (&attr, PTHREAD_SCOPE_PROCESS); |
446 | pthread_create (&ctx->id, &attr, coro_init, &args); |
448 | pthread_create (&ctx->id, &attr, coro_init, &args); |