Skip to content

Commit d3b3208

Browse files
committed
---
yaml --- r: 77151 b: refs/heads/snap-stage3 c: 4c75d36 h: refs/heads/master i: 77149: f44b88e 77147: 4c7d0b4 77143: fa0844a 77135: b43c548 77119: b333657 v: v3
1 parent a4e7ce1 commit d3b3208

File tree

5 files changed

+21
-18
lines changed

5 files changed

+21
-18
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: f1132496dddbdd88f321a7919eec3d65136b3f75
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: c96b1d89c490807b7ecdc9929a445dd82987275c
4+
refs/heads/snap-stage3: 4c75d36d0e81508d4e7614104abb44fa19179c03
55
refs/heads/try: ebfe63cd1c0b5d23f7ea60c69b4fde2e30cfd42a
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libextra/uuid.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ mod bench {
787787
pub fn parse_str(bh: &mut BenchHarness) {
788788
let s = "urn:uuid:F9168C5E-CEB2-4faa-B6BF-329BF39FA1E4";
789789
do bh.iter {
790-
Uuid::parse_string(s);
790+
let u = Uuid::parse_string(s);
791791
}
792792
}
793793
}

branches/snap-stage3/src/libstd/rt/sched.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,11 +563,10 @@ impl Scheduler {
563563
// run the cleanup job, as expected by the previously called
564564
// swap_contexts function.
565565
unsafe {
566-
let sched = Local::unsafe_borrow::<Scheduler>();
567-
(*sched).run_cleanup_job();
566+
let task = Local::unsafe_borrow::<Task>();
567+
(*task).sched.get_mut_ref().run_cleanup_job();
568568

569569
// Must happen after running the cleanup job (of course).
570-
let task = Local::unsafe_borrow::<Task>();
571570
(*task).death.check_killed((*task).unwinder.unwinding);
572571
}
573572
}

branches/snap-stage3/src/libstd/run.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ fn waitpid(pid: pid_t) -> int {
949949
#[cfg(test)]
950950
mod tests {
951951
use io;
952-
use libc::c_int;
952+
use libc::{c_int, uintptr_t};
953953
use option::{Option, None, Some};
954954
use os;
955955
use path::Path;

branches/snap-stage3/src/libstd/unstable/sync.rs

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -281,20 +281,24 @@ impl<T> Drop for UnsafeAtomicRcBox<T>{
281281
*/
282282
// FIXME(#8140) should not be pub
283283
pub unsafe fn atomically<U>(f: &fn() -> U) -> U {
284-
use rt::task::Task;
284+
use rt::task::{Task, GreenTask, SchedTask};
285285
use rt::local::Local;
286-
use rt::in_green_task_context;
287-
288-
if in_green_task_context() {
289-
let t = Local::unsafe_borrow::<Task>();
290-
do (|| {
291-
(*t).death.inhibit_deschedule();
292-
f()
293-
}).finally {
294-
(*t).death.allow_deschedule();
286+
287+
match Local::try_unsafe_borrow::<Task>() {
288+
Some(t) => {
289+
match (*t).task_type {
290+
GreenTask(_) => {
291+
do (|| {
292+
(*t).death.inhibit_deschedule();
293+
f()
294+
}).finally {
295+
(*t).death.allow_deschedule();
296+
}
297+
}
298+
SchedTask => f()
299+
}
295300
}
296-
} else {
297-
f()
301+
None => f()
298302
}
299303
}
300304

0 commit comments

Comments
 (0)