diff --git a/src/rt/rust_builtin.cpp b/src/rt/rust_builtin.cpp index f80e2e822c0de..f9d1f71f0ac94 100644 --- a/src/rt/rust_builtin.cpp +++ b/src/rt/rust_builtin.cpp @@ -637,11 +637,6 @@ rust_new_task_in_sched(rust_sched_id id) { return new_task_common(sched, task); } -extern "C" CDECL void -rust_task_config_notify(rust_task *target, rust_port_id *port) { - target->config_notify(*port); -} - extern "C" rust_task * rust_get_task() { return rust_get_current_task(); diff --git a/src/rt/rust_task.cpp b/src/rt/rust_task.cpp index e7a18e904617b..ab07f317550ce 100644 --- a/src/rt/rust_task.cpp +++ b/src/rt/rust_task.cpp @@ -15,7 +15,6 @@ rust_task::rust_task(rust_sched_loop *sched_loop, rust_task_state state, const char *name, size_t init_stack_sz) : ref_count(1), id(0), - notify_enabled(false), stk(NULL), runtime_sp(0), sched(sched_loop->sched), @@ -141,8 +140,6 @@ cleanup_task(cleanup_args *args) { task->die(); - task->notify(!threw_exception); - #ifdef __WIN32__ assert(!threw_exception && "No exception-handling yet on windows builds"); #endif @@ -454,23 +451,6 @@ rust_task::calloc(size_t size, const char *tag) { return local_region.calloc(size, tag); } -void -rust_task::notify(bool success) { - // FIXME (#1078) Do this in rust code - if(notify_enabled) { - rust_port *target_port = - kernel->get_port_by_id(notify_port); - if(target_port) { - task_notification msg; - msg.id = id; - msg.result = !success ? tr_failure : tr_success; - - target_port->send(&msg); - target_port->deref(); - } - } -} - size_t rust_task::get_next_stack_size(size_t min, size_t current, size_t requested) { LOG(this, mem, "calculating new stack size for 0x%" PRIxPTR, this); @@ -636,12 +616,6 @@ rust_task::delete_all_stacks() { } } -void -rust_task::config_notify(rust_port_id port) { - notify_enabled = true; - notify_port = port; -} - /* Returns true if we're currently running on the Rust stack */ diff --git a/src/rt/rust_task.h b/src/rt/rust_task.h index 8df119565f015..3b8e78cf1dd03 100644 --- a/src/rt/rust_task.h +++ b/src/rt/rust_task.h @@ -125,8 +125,6 @@ rust_task : public kernel_owned RUST_ATOMIC_REFCOUNT(); rust_task_id id; - bool notify_enabled; - rust_port_id notify_port; context ctx; stk_seg *stk; @@ -285,8 +283,6 @@ rust_task : public kernel_owned // not at all safe. intptr_t get_ref_count() const { return ref_count; } - void notify(bool success); - void *next_stack(size_t stk_sz, void *args_addr, size_t args_sz); void prev_stack(); void record_stack_limit(); @@ -296,8 +292,6 @@ rust_task : public kernel_owned void check_stack_canary(); void delete_all_stacks(); - void config_notify(rust_port_id port); - void call_on_c_stack(void *args, void *fn_ptr); void call_on_rust_stack(void *args, void *fn_ptr); bool have_c_stack() { return c_stack != NULL; }