Skip to content

Commit c68f2d9

Browse files
committed
Remove notification channels in runtime (closes #1078)
1 parent d9e8efc commit c68f2d9

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
lines changed

src/rt/rust_builtin.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -637,11 +637,6 @@ rust_new_task_in_sched(rust_sched_id id) {
637637
return new_task_common(sched, task);
638638
}
639639

640-
extern "C" CDECL void
641-
rust_task_config_notify(rust_task *target, rust_port_id *port) {
642-
target->config_notify(*port);
643-
}
644-
645640
extern "C" rust_task *
646641
rust_get_task() {
647642
return rust_get_current_task();

src/rt/rust_task.cpp

-26
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ rust_task::rust_task(rust_sched_loop *sched_loop, rust_task_state state,
1515
const char *name, size_t init_stack_sz) :
1616
ref_count(1),
1717
id(0),
18-
notify_enabled(false),
1918
stk(NULL),
2019
runtime_sp(0),
2120
sched(sched_loop->sched),
@@ -141,8 +140,6 @@ cleanup_task(cleanup_args *args) {
141140

142141
task->die();
143142

144-
task->notify(!threw_exception);
145-
146143
#ifdef __WIN32__
147144
assert(!threw_exception && "No exception-handling yet on windows builds");
148145
#endif
@@ -454,23 +451,6 @@ rust_task::calloc(size_t size, const char *tag) {
454451
return local_region.calloc(size, tag);
455452
}
456453

457-
void
458-
rust_task::notify(bool success) {
459-
// FIXME (#1078) Do this in rust code
460-
if(notify_enabled) {
461-
rust_port *target_port =
462-
kernel->get_port_by_id(notify_port);
463-
if(target_port) {
464-
task_notification msg;
465-
msg.id = id;
466-
msg.result = !success ? tr_failure : tr_success;
467-
468-
target_port->send(&msg);
469-
target_port->deref();
470-
}
471-
}
472-
}
473-
474454
size_t
475455
rust_task::get_next_stack_size(size_t min, size_t current, size_t requested) {
476456
LOG(this, mem, "calculating new stack size for 0x%" PRIxPTR, this);
@@ -636,12 +616,6 @@ rust_task::delete_all_stacks() {
636616
}
637617
}
638618

639-
void
640-
rust_task::config_notify(rust_port_id port) {
641-
notify_enabled = true;
642-
notify_port = port;
643-
}
644-
645619
/*
646620
Returns true if we're currently running on the Rust stack
647621
*/

src/rt/rust_task.h

-6
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ rust_task : public kernel_owned<rust_task>
125125
RUST_ATOMIC_REFCOUNT();
126126

127127
rust_task_id id;
128-
bool notify_enabled;
129-
rust_port_id notify_port;
130128

131129
context ctx;
132130
stk_seg *stk;
@@ -285,8 +283,6 @@ rust_task : public kernel_owned<rust_task>
285283
// not at all safe.
286284
intptr_t get_ref_count() const { return ref_count; }
287285

288-
void notify(bool success);
289-
290286
void *next_stack(size_t stk_sz, void *args_addr, size_t args_sz);
291287
void prev_stack();
292288
void record_stack_limit();
@@ -296,8 +292,6 @@ rust_task : public kernel_owned<rust_task>
296292
void check_stack_canary();
297293
void delete_all_stacks();
298294

299-
void config_notify(rust_port_id port);
300-
301295
void call_on_c_stack(void *args, void *fn_ptr);
302296
void call_on_rust_stack(void *args, void *fn_ptr);
303297
bool have_c_stack() { return c_stack != NULL; }

0 commit comments

Comments
 (0)