Skip to content

Commit

Permalink
fixup! Add threadpool support to runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsamaroo committed Sep 18, 2021
1 parent 32e7b2e commit 943d4fb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -1862,6 +1862,8 @@ typedef struct _jl_task_t {
JL_DLLEXPORT jl_task_t *jl_new_task(jl_function_t*, jl_value_t*, size_t);
JL_DLLEXPORT void jl_switchto(jl_task_t **pt);
JL_DLLEXPORT int jl_set_task_tid(jl_task_t *task, int tid) JL_NOTSAFEPOINT;
JL_DLLEXPORT int16_t jl_tid_to_relative(int16_t rawtid) JL_NOTSAFEPOINT;
JL_DLLEXPORT int16_t jl_tid_to_poolid(int16_t tid) JL_NOTSAFEPOINT;
JL_DLLEXPORT void JL_NORETURN jl_throw(jl_value_t *e JL_MAYBE_UNROOTED);
JL_DLLEXPORT void JL_NORETURN jl_rethrow(void);
JL_DLLEXPORT void JL_NORETURN jl_sig_throw(void);
Expand Down
4 changes: 2 additions & 2 deletions src/threading.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ JL_DLLEXPORT int16_t jl_threadid(void)
}

// return calling thread's relative ID (with respect to its threadpool)
int16_t jl_tid_to_relative(int16_t rawtid)
JL_DLLEXPORT int16_t jl_tid_to_relative(int16_t rawtid)
{
if (rawtid < 0)
return rawtid;
Expand All @@ -315,7 +315,7 @@ JL_DLLEXPORT int16_t jl_relative_threadid(void)
return jl_tid_to_relative(jl_current_task->tid);
}

int16_t jl_tid_to_poolid(int16_t tid)
JL_DLLEXPORT int16_t jl_tid_to_poolid(int16_t tid)
{
int tp_offset = 0;
for (int tp = 0; tp < jl_threadpools; tp++) {
Expand Down

0 comments on commit 943d4fb

Please sign in to comment.