Skip to content

Commit 9c0b469

Browse files
committed
Add rust_task_kill_other
1 parent 2ffa9b6 commit 9c0b469

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/rt/rust_builtin.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,11 @@ rust_task_allow_kill() {
858858
task->allow_kill();
859859
}
860860

861+
extern "C" void
862+
rust_task_kill_other(rust_task *task) { /* Used for linked failure */
863+
task->kill();
864+
}
865+
861866
extern "C" rust_cond_lock*
862867
rust_create_cond_lock() {
863868
return new rust_cond_lock();
@@ -884,6 +889,7 @@ rust_unlock_cond_lock(rust_cond_lock *lock) {
884889

885890
extern "C" void
886891
rust_wait_cond_lock(rust_cond_lock *lock) {
892+
assert(false && "condition->wait() is totally broken! Don't use it!");
887893
rust_task *task = rust_get_current_task();
888894
lock->lock.must_have_lock();
889895
assert(NULL == lock->waiting);
@@ -897,6 +903,7 @@ rust_wait_cond_lock(rust_cond_lock *lock) {
897903

898904
extern "C" bool
899905
rust_signal_cond_lock(rust_cond_lock *lock) {
906+
assert(false && "condition->signal() is totally broken! Don't use it!");
900907
lock->lock.must_have_lock();
901908
if(NULL == lock->waiting) {
902909
return false;

src/rt/rustrt.def.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ rust_port_drop
180180
rust_port_task
181181
rust_task_inhibit_kill
182182
rust_task_allow_kill
183+
rust_task_kill_other
183184
rust_create_cond_lock
184185
rust_destroy_cond_lock
185186
rust_lock_cond_lock

0 commit comments

Comments
 (0)