Skip to content

Commit

Permalink
remove extraneous gc root in start_task
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash committed Dec 14, 2014
1 parent c37f371 commit 8203538
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,11 +241,8 @@ NORETURN start_task()
{
// this runs the first time we switch to a task
jl_task_t *t = jl_current_task;
jl_value_t *arg = jl_task_arg_in_transit;
jl_value_t *res;
JL_GC_PUSH1(&arg);
res = jl_apply(t->start, NULL, 0);
JL_GC_POP();
finish_task(t, res);
abort();
}
Expand Down

3 comments on commit 8203538

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section of code looks a bit different on release-0.3

julia/src/task.c

Lines 409 to 428 in 31b8fb6

static void start_task(jl_task_t *t)
{
// this runs the first time we switch to t
jl_value_t *arg = jl_task_arg_in_transit;
jl_value_t *res;
JL_GC_PUSH1(&arg);
#ifdef COPY_STACKS
ptrint_t local_sp = (ptrint_t)jl_pgcstack;
// here we attempt to figure out how big our stack frame is, since we
// might need to copy all of it later. this is a bit of a fuzzy guess.
local_sp += sizeof(jl_gcframe_t);
local_sp += 12*sizeof(void*);
t->stackbase = (void*)(local_sp + _frame_offset);
#endif
res = jl_apply(t->start, NULL, 0);
JL_GC_POP();
finish_task(t, res);
assert(0);
}

It has these three lines in it, but also some #ifdef COPY_STACKS stuff in between them. Still safe to remove these lines?

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, yes, that would cause slight issues.

Please sign in to comment.