Skip to content

Commit

Permalink
Remove now-dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
VoxSciurorum committed Sep 20, 2024
1 parent 1efabc6 commit f9f28df
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions runtime/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,44 +441,6 @@ static void __cilkrts_stop_workers(global_state *g) {
g->workers_started = false;
}

// Block until signaled the Cilkified region is done. Executed by the Cilkfying
// thread.
static inline void wait_until_cilk_done(global_state *g) {
wait_while_cilkified(g);
}

// Helper method to make the boss thread wait for the cilkified region
// to complete.
static inline __attribute__((noinline)) void boss_wait_helper(void) {
// The setjmp/longjmp to and from user code can invalidate the
// function arguments and local variables in this function. Get
// fresh copies of these arguments from the runtime's global
// state.
global_state *g = __cilkrts_tls_worker->g;
__cilkrts_stack_frame *sf = g->root_closure->frame;
CILK_BOSS_START_TIMING(g);

// Wait until the cilkified region is done executing.
wait_until_cilk_done(g);

__cilkrts_need_to_cilkify = true;

// At this point, some Cilk worker must have completed the
// Cilkified region and executed uncilkify at the end of the Cilk
// function. The longjmp will therefore jump to the end of the
// Cilk function. We need only restore the stack pointer to its
// original value on the Cilkifying thread's stack.

CILK_BOSS_STOP_TIMING(g);

// Restore the boss's original rsp, so the boss completes the Cilk
// function on its original stack.
SP(sf) = g->orig_rsp;
sysdep_restore_fp_state(sf);
sanitizer_start_switch_fiber(NULL);
__builtin_longjmp(sf->ctx, 1);
}

// Setup runtime structures to start a new Cilkified region. Executed by the
// Cilkifying thread in cilkify().
void __cilkrts_internal_invoke_cilkified_root(__cilkrts_stack_frame *sf) {
Expand Down

0 comments on commit f9f28df

Please sign in to comment.