Skip to content

Commit fbe3380

Browse files
author
KDr2
committed
add function vanilla_get_current_task to task.c
1 parent 806240c commit fbe3380

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

deps/task.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55

66
#include "julia.h"
77

8+
jl_task_t *vanilla_get_current_task(void)
9+
{
10+
jl_ptls_t ptls = jl_get_ptls_states();
11+
return (jl_task_t*)ptls->current_task;
12+
}
13+
14+
815
jl_task_t *jl_enable_stack_copying(jl_task_t *t)
916
{
1017
#if JULIA_VERSION_MAJOR == 1 && JULIA_VERSION_MINOR >= 1

0 commit comments

Comments
 (0)