Skip to content

Commit f6c2f73

Browse files
committed
---
yaml --- r: 85743 b: refs/heads/dist-snap c: 4c75d36 h: refs/heads/master i: 85741: 3cd2424 85739: 4f6c704 85735: 5963353 85727: ab81f06 v: v3
1 parent 4aba9d9 commit f6c2f73

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
@@ -6,7 +6,7 @@ refs/heads/try: 0983ebe5310d4eb6d289f636f7ed0536c08bbc0e
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
9-
refs/heads/dist-snap: c96b1d89c490807b7ecdc9929a445dd82987275c
9+
refs/heads/dist-snap: 4c75d36d0e81508d4e7614104abb44fa19179c03
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1212
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/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/dist-snap/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/dist-snap/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/dist-snap/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)