Skip to content

Commit 27ae7e2

Browse files
committed
---
yaml --- r: 14151 b: refs/heads/try c: d756b01 h: refs/heads/master i: 14149: ea2c821 14147: 2163b32 14143: f7dc0af v: v3
1 parent f09dd1b commit 27ae7e2

File tree

5 files changed

+20
-1
lines changed

5 files changed

+20
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
refs/heads/master: 61b1875c16de39c166b0f4d54bba19f9c6777d1a
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 4a81779abd786ff22d71434c6d9a5917ea4cdfff
5-
refs/heads/try: e0d5b92b84424b5b1dbd2dec7d32e92e1550832b
5+
refs/heads/try: d756b01619444bbbaa27d1f43ca4000c976c8bee
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105

branches/try/src/rt/rust_builtin.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,6 +481,16 @@ drop_task(rust_task *target) {
481481
}
482482
}
483483

484+
extern "C" CDECL void
485+
rust_task_config_notify(rust_task_id task_id, chan_handle *chan) {
486+
rust_task *task = rust_task_thread::get_task();
487+
rust_task *target = task->kernel->get_task_by_id(task_id);
488+
A(task->thread, target != NULL,
489+
"This function should only be called when we know the task exists");
490+
target->config_notify(*chan);
491+
target->deref();
492+
}
493+
484494
extern "C" CDECL rust_task *
485495
get_task_pointer(rust_task_id id) {
486496
rust_task *task = rust_task_thread::get_task();

branches/try/src/rt/rust_task.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -713,6 +713,12 @@ rust_task::check_stack_canary() {
713713
::check_stack_canary(stk);
714714
}
715715

716+
void
717+
rust_task::config_notify(chan_handle chan) {
718+
user.notify_enabled = true;
719+
user.notify_chan = chan;
720+
}
721+
716722
//
717723
// Local Variables:
718724
// mode: C++

branches/try/src/rt/rust_task.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,8 @@ rust_task : public kernel_owned<rust_task>, rust_cond
181181
void reset_stack_limit();
182182
bool on_rust_stack();
183183
void check_stack_canary();
184+
185+
void config_notify(chan_handle chan);
184186
};
185187

186188
//

branches/try/src/rt/rustrt.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ rust_env_pairs
4949
rust_task_yield
5050
rust_task_is_unwinding
5151
rust_get_task
52+
rust_task_config_notify
5253
sched_threads
5354
shape_log_str
5455
squareroot

0 commit comments

Comments
 (0)