File tree 4 files changed +8
-0
lines changed
4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ pub mod rustrt {
73
73
pub unsafe fn rust_gc_metadata ( ) -> * Word ;
74
74
75
75
pub unsafe fn rust_get_stack_segment ( ) -> * StackSegment ;
76
+ pub unsafe fn rust_get_c_stack ( ) -> * StackSegment ;
76
77
}
77
78
}
78
79
Original file line number Diff line number Diff line change @@ -549,6 +549,11 @@ rust_get_stack_segment() {
549
549
return rust_get_current_task ()->stk ;
550
550
}
551
551
552
+ extern " C" CDECL stk_seg *
553
+ rust_get_c_stack () {
554
+ return rust_get_current_task ()->get_c_stack ();
555
+ }
556
+
552
557
extern " C" CDECL void
553
558
start_task (rust_task *target, fn_env_pair *f) {
554
559
target->start (f->f , f->env , NULL );
Original file line number Diff line number Diff line change @@ -374,6 +374,7 @@ rust_task : public kernel_owned<rust_task>
374
374
void call_on_c_stack (void *args, void *fn_ptr);
375
375
void call_on_rust_stack (void *args, void *fn_ptr);
376
376
bool have_c_stack () { return c_stack != NULL ; }
377
+ stk_seg *get_c_stack () { return c_stack; }
377
378
378
379
rust_task_state get_state () { return state; }
379
380
rust_cond *get_cond () { return cond; }
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ rust_task_is_unwinding
49
49
rust_get_task
50
50
rust_try_get_task
51
51
rust_get_stack_segment
52
+ rust_get_c_stack
52
53
rust_log_str
53
54
start_task
54
55
vec_reserve_shared_actual
You can’t perform that action at this time.
0 commit comments