JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.9k stars 5.49k forks source link

Fallback for `JL_HAVE_UCONTEXT` task-switching broken #30087

Open vchuravy opened 6 years ago

vchuravy commented 6 years ago

PPC is currently falling back onto JL_HAVE_UCONTEXT which doesn't compile

In file included from /raid1/home/ibm/valentin/src/julia/src/julia.h:20:0,
                 from /raid1/home/ibm/valentin/src/julia/src/task.c:34:
/raid1/home/ibm/valentin/src/julia/src/task.c: In function ‘ctx_switch’:
/raid1/home/ibm/valentin/src/julia/src/julia.h:1683:24: error: incompatible type for argument 1 of ‘__sigsetjmp’
 #define jl_setjmp(a,b) sigsetjmp(a,b)
                        ^
/raid1/home/ibm/valentin/src/julia/src/task.c:278:17: note: in expansion of macro ‘jl_setjmp’
             if (jl_setjmp(lastt->ctx.uc_mcontext, 0)) {
                 ^
/usr/include/setjmp.h:59:12: note: expected ‘struct __jmp_buf_tag *’ but argument is of type ‘mcontext_t’
 extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __THROWNL;

cc: @vtjnash

nalimilan commented 5 years ago

Any idea whether this would be trivial or not?