Skip to content

Commit

Permalink
make libtask compatible with Julia 1.6 (#2176)
Browse files Browse the repository at this point in the history
* make libtask compatible with Julia 1.6

* remove deleted fields in task_t
  • Loading branch information
KDr2 authored Apr 8, 2021
1 parent e93b3b9 commit b19036c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions L/Libtask/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder, Pkg

julia_version = v"1.5.1"
julia_version = v"1.6.0"

name = "Libtask"
version = v"0.4.2"
version = v"0.4.3"

# Collection of sources required to build Libtask
sources = [
Expand Down
14 changes: 11 additions & 3 deletions L/Libtask/bundled/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,28 @@ jl_task_t *jl_clone_task(jl_task_t *t)
newt->gcstack = NULL;
JL_GC_PUSH1(&newt);

#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR < 6
newt->state = t->state;
newt->exception = jl_nothing;
newt->backtrace = jl_nothing;
#else
// newt->next = jl_nothing;
newt->_state = t->_state;
newt->_isexception = t->_isexception;
newt->prio = t->prio;
newt->excstack = NULL; // t->excstack;
#endif

newt->start = t->start;
newt->tls = jl_nothing;
newt->logstate = ptls->current_task->logstate;
newt->result = jl_nothing;
newt->donenotify = jl_nothing;
newt->exception = jl_nothing;
newt->backtrace = jl_nothing;
newt->eh = t->eh;
newt->gcstack = t->gcstack;
newt->tid = t->tid; // TODO: need testing
newt->started = t->started; // TODO: need testing


newt->copy_stack = t->copy_stack;
memcpy((void*)newt->ctx.uc_mcontext, (void*)t->ctx.uc_mcontext, sizeof(jl_jmp_buf));
newt->queue = t->queue;
Expand Down

0 comments on commit b19036c

Please sign in to comment.