Skip to content

Commit d1ec8b5

Browse files
committed
redesigned the pinning to pin deal with things on dequeue, not on enqueue
1 parent 4224fc7 commit d1ec8b5

File tree

6 files changed

+393
-213
lines changed

6 files changed

+393
-213
lines changed

src/libstd/macros.rs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,7 @@ pub fn do_abort() -> ! {
4949
macro_rules! abort(
5050
($( $msg:expr),+) => ( {
5151
rtdebug!($($msg),+);
52-
53-
// do_abort();
54-
55-
// NB: This is in a fn to avoid putting the `unsafe` block in
56-
// a macro, which causes spurious 'unnecessary unsafe block'
57-
// warnings.
58-
// fn do_abort() -> ! {
59-
// unsafe { ::libc::abort(); }
60-
// }
61-
6252
::macros::do_abort();
63-
6453
} )
6554
)
6655

src/libstd/rt/local.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl Local for Scheduler {
3030
fn borrow<T>(f: &fn(&mut Scheduler) -> T) -> T {
3131
let mut res: Option<T> = None;
3232
let res_ptr: *mut Option<T> = &mut res;
33-
unsafe {
33+
unsafe {
3434
do local_ptr::borrow |sched| {
3535
let result = f(sched);
3636
*res_ptr = Some(result);
@@ -39,7 +39,7 @@ impl Local for Scheduler {
3939
match res {
4040
Some(r) => { r }
4141
None => abort!("function failed!")
42-
}
42+
}
4343
}
4444
unsafe fn unsafe_borrow() -> *mut Scheduler { local_ptr::unsafe_borrow() }
4545
unsafe fn try_unsafe_borrow() -> Option<*mut Scheduler> { abort!("unimpl") }
@@ -139,5 +139,5 @@ mod test {
139139
assert!(res)
140140
let _scheduler: ~Scheduler = Local::take();
141141
}
142-
142+
143143
}

0 commit comments

Comments
 (0)