Skip to content

Commit f42847f

Browse files
committed
---
yaml --- r: 69612 b: refs/heads/auto c: 43fecf3 h: refs/heads/master v: v3
1 parent feeaf2c commit f42847f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 92f60f4365beb7b0677b196b1650069bd88cb616
17+
refs/heads/auto: 43fecf3556b47305320221586f48f89fe2f6c505
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libstd/rt/sched.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -540,6 +540,10 @@ impl Scheduler {
540540
// The current task is grabbed from TLS, not taken as an input.
541541
let current_task: ~Task = Local::take::<Task>();
542542

543+
// Check that the task is not in an atomically() section (e.g.,
544+
// holding a pthread mutex, which could deadlock the scheduler).
545+
current_task.death.assert_may_sleep();
546+
543547
// These transmutes do something fishy with a closure.
544548
let f_fake_region = unsafe {
545549
transmute::<&fn(&mut Scheduler, ~Task),

0 commit comments

Comments
 (0)