diff options
| author | Brian Anderson <banderson@mozilla.com> | 2013-06-17 23:24:50 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2013-06-17 23:24:50 -0700 |
| commit | b5fbec9c1e519c7e6fa45e2157f6e746ef3f6849 (patch) | |
| tree | 17733cc64b34dbc72789a494e2c3f67fa766a825 /src/libstd/rt | |
| parent | 021e81fbd311d93c94cbd40524ff53062fd7fe6e (diff) | |
| download | rust-b5fbec9c1e519c7e6fa45e2157f6e746ef3f6849.tar.gz rust-b5fbec9c1e519c7e6fa45e2157f6e746ef3f6849.zip | |
std: Rename `abort!` to `rtabort!` to match other macros
Diffstat (limited to 'src/libstd/rt')
| -rw-r--r-- | src/libstd/rt/global_heap.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/local.rs | 24 | ||||
| -rw-r--r-- | src/libstd/rt/local_ptr.rs | 2 | ||||
| -rw-r--r-- | src/libstd/rt/sched.rs | 14 |
4 files changed, 21 insertions, 21 deletions
diff --git a/src/libstd/rt/global_heap.rs b/src/libstd/rt/global_heap.rs index 9f273fc8e65..b180cec9838 100644 --- a/src/libstd/rt/global_heap.rs +++ b/src/libstd/rt/global_heap.rs @@ -82,7 +82,7 @@ pub fn cleanup() { let count_ptr = exchange_count_ptr(); let allocations = atomic_load(&*count_ptr); if allocations != 0 { - abort!("exchange heap not empty on exit\ + rtabort!("exchange heap not empty on exit\ %i dangling allocations", allocations); } } diff --git a/src/libstd/rt/local.rs b/src/libstd/rt/local.rs index 6e0fbda5ec9..6df1ffaa453 100644 --- a/src/libstd/rt/local.rs +++ b/src/libstd/rt/local.rs @@ -38,17 +38,17 @@ impl Local for Scheduler { } match res { Some(r) => { r } - None => abort!("function failed!") + None => rtabort!("function failed!") } } unsafe fn unsafe_borrow() -> *mut Scheduler { local_ptr::unsafe_borrow() } - unsafe fn try_unsafe_borrow() -> Option<*mut Scheduler> { abort!("unimpl") } + unsafe fn try_unsafe_borrow() -> Option<*mut Scheduler> { rtabort!("unimpl") } } impl Local for Task { - fn put(_value: ~Task) { abort!("unimpl") } - fn take() -> ~Task { abort!("unimpl") } - fn exists() -> bool { abort!("unimpl") } + fn put(_value: ~Task) { rtabort!("unimpl") } + fn take() -> ~Task { rtabort!("unimpl") } + fn exists() -> bool { rtabort!("unimpl") } fn borrow<T>(f: &fn(&mut Task) -> T) -> T { do Local::borrow::<Scheduler, T> |sched| { match sched.current_task { @@ -56,7 +56,7 @@ impl Local for Task { f(&mut *task.task) } None => { - abort!("no scheduler") + rtabort!("no scheduler") } } } @@ -69,7 +69,7 @@ impl Local for Task { } None => { // Don't fail. Infinite recursion - abort!("no scheduler") + rtabort!("no scheduler") } } } @@ -84,16 +84,16 @@ impl Local for Task { // XXX: This formulation won't work once ~IoFactoryObject is a real trait pointer impl Local for IoFactoryObject { - fn put(_value: ~IoFactoryObject) { abort!("unimpl") } - fn take() -> ~IoFactoryObject { abort!("unimpl") } - fn exists() -> bool { abort!("unimpl") } - fn borrow<T>(_f: &fn(&mut IoFactoryObject) -> T) -> T { abort!("unimpl") } + fn put(_value: ~IoFactoryObject) { rtabort!("unimpl") } + fn take() -> ~IoFactoryObject { rtabort!("unimpl") } + fn exists() -> bool { rtabort!("unimpl") } + fn borrow<T>(_f: &fn(&mut IoFactoryObject) -> T) -> T { rtabort!("unimpl") } unsafe fn unsafe_borrow() -> *mut IoFactoryObject { let sched = Local::unsafe_borrow::<Scheduler>(); let io: *mut IoFactoryObject = (*sched).event_loop.io().unwrap(); return io; } - unsafe fn try_unsafe_borrow() -> Option<*mut IoFactoryObject> { abort!("unimpl") } + unsafe fn try_unsafe_borrow() -> Option<*mut IoFactoryObject> { rtabort!("unimpl") } } #[cfg(test)] diff --git a/src/libstd/rt/local_ptr.rs b/src/libstd/rt/local_ptr.rs index 0db903f81ee..cd7c5daa444 100644 --- a/src/libstd/rt/local_ptr.rs +++ b/src/libstd/rt/local_ptr.rs @@ -109,7 +109,7 @@ pub unsafe fn unsafe_borrow<T>() -> *mut T { fn tls_key() -> tls::Key { match maybe_tls_key() { Some(key) => key, - None => abort!("runtime tls key not initialized") + None => rtabort!("runtime tls key not initialized") } } diff --git a/src/libstd/rt/sched.rs b/src/libstd/rt/sched.rs index be57247d514..5c082988012 100644 --- a/src/libstd/rt/sched.rs +++ b/src/libstd/rt/sched.rs @@ -357,7 +357,7 @@ impl Scheduler { home_handle.send(PinnedTask(task)); } AnySched => { - abort!("error: cannot send anysched task home"); + rtabort!("error: cannot send anysched task home"); } } } @@ -422,10 +422,10 @@ impl Scheduler { return true; } 4 => { - abort!("task home was None!"); + rtabort!("task home was None!"); } _ => { - abort!("literally, you should not be here"); + rtabort!("literally, you should not be here"); } } } @@ -452,7 +452,7 @@ impl Scheduler { dead_task.take().recycle(&mut sched.stack_pool); } - abort!("control reached end of task"); + rtabort!("control reached end of task"); } pub fn schedule_task(~self, task: ~Coroutine) { @@ -672,7 +672,7 @@ impl Coroutine { Some(Sched(SchedHandle { sched_id: ref id, _ })) => { *id == sched.sched_id() } - None => { abort!("error: homeless task!"); } + None => { rtabort!("error: homeless task!"); } } } } @@ -696,7 +696,7 @@ impl Coroutine { match self.task.home { Some(AnySched) => { false } Some(Sched(_)) => { true } - None => { abort!("error: homeless task!"); + None => { rtabort!("error: homeless task!"); } } } @@ -710,7 +710,7 @@ impl Coroutine { Some(Sched(SchedHandle { sched_id: ref id, _})) => { *id == sched.sched_id() } - None => { abort!("error: homeless task!"); } + None => { rtabort!("error: homeless task!"); } } } |
