File tree Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Expand file tree Collapse file tree 3 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ refs/heads/try: d324a424d8f84b1eb049b12cf34182bda91b0024
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
9
- refs/heads/incoming: 0229bc4defdaa6bad77269204279ed1a37b3aa9f
9
+ refs/heads/incoming: 47cca22d5455d2d60226ead907fd627784701ef5
10
10
refs/heads/dist-snap: 2f32a1581f522e524009138b33b1c7049ced668d
11
11
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
12
12
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
Original file line number Diff line number Diff line change @@ -1473,9 +1473,13 @@ extern mod rustrt {
1473
1473
1474
1474
fn rust_task_is_unwinding( task: * rust_task) -> bool ;
1475
1475
fn rust_osmain_sched_id( ) -> sched_id;
1476
+ #[ rust_stack]
1476
1477
fn rust_task_inhibit_kill( t: * rust_task) ;
1478
+ #[ rust_stack]
1477
1479
fn rust_task_allow_kill( t: * rust_task) ;
1480
+ #[ rust_stack]
1478
1481
fn rust_task_inhibit_yield( t: * rust_task) ;
1482
+ #[ rust_stack]
1479
1483
fn rust_task_allow_yield( t: * rust_task) ;
1480
1484
fn rust_task_kill_other( task: * rust_task) ;
1481
1485
fn rust_task_kill_all( task: * rust_task) ;
Original file line number Diff line number Diff line change @@ -631,27 +631,29 @@ rust_task::on_rust_stack() {
631
631
}
632
632
}
633
633
634
+ // NB: In inhibit_kill and allow_kill, helgrind would complain that we need to
635
+ // hold lifecycle_lock while accessing disallow_kill. Even though another
636
+ // killing task may access disallow_kill concurrently, this is not racy
637
+ // because the killer only cares if this task is blocking, and block() already
638
+ // uses proper locking. See https://github.com/mozilla/rust/issues/3213 .
639
+
634
640
void
635
641
rust_task::inhibit_kill () {
636
- scoped_lock with (lifecycle_lock);
637
642
// Here might be good, though not mandatory, to check if we have to die.
638
643
disallow_kill++;
639
644
}
640
645
641
646
void
642
647
rust_task::allow_kill () {
643
- scoped_lock with (lifecycle_lock);
644
648
assert (disallow_kill > 0 && " Illegal allow_kill(): already killable!" );
645
649
disallow_kill--;
646
650
}
647
651
648
652
void rust_task::inhibit_yield () {
649
- scoped_lock with (lifecycle_lock);
650
653
disallow_yield++;
651
654
}
652
655
653
656
void rust_task::allow_yield () {
654
- scoped_lock with (lifecycle_lock);
655
657
assert (disallow_yield > 0 && " Illegal allow_yield(): already yieldable!" );
656
658
disallow_yield--;
657
659
}
You can’t perform that action at this time.
0 commit comments