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 @@ -544,6 +544,11 @@ rust_get_stack_segment() {
544
544
return rust_get_current_task ()->stk ;
545
545
}
546
546
547
+ extern " C" CDECL stk_seg *
548
+ rust_get_c_stack () {
549
+ return rust_get_current_task ()->get_c_stack ();
550
+ }
551
+
547
552
extern " C" CDECL void
548
553
start_task (rust_task *target, fn_env_pair *f) {
549
554
target->start (f->f , f->env , NULL );
Original file line number Diff line number Diff line change @@ -367,6 +367,7 @@ rust_task : public kernel_owned<rust_task>
367
367
void call_on_c_stack (void *args, void *fn_ptr);
368
368
void call_on_rust_stack (void *args, void *fn_ptr);
369
369
bool have_c_stack () { return c_stack != NULL ; }
370
+ stk_seg *get_c_stack () { return c_stack; }
370
371
371
372
rust_task_state get_state () { return state; }
372
373
rust_cond *get_cond () { return cond; }
Original file line number Diff line number Diff line change @@ -48,6 +48,7 @@ rust_task_yield
48
48
rust_task_is_unwinding
49
49
rust_get_task
50
50
rust_get_stack_segment
51
+ rust_get_c_stack
51
52
rust_log_str
52
53
start_task
53
54
vec_reserve_shared_actual
You can’t perform that action at this time.
0 commit comments