std: Rename abort! to rtabort! to match other macros
This commit is contained in:
parent
021e81fbd3
commit
b5fbec9c1e
5 changed files with 23 additions and 23 deletions
|
|
@ -33,13 +33,13 @@ macro_rules! rtdebug (
|
|||
macro_rules! rtassert (
|
||||
( $arg:expr ) => ( {
|
||||
if !$arg {
|
||||
abort!("assertion failed: %s", stringify!($arg));
|
||||
rtabort!("assertion failed: %s", stringify!($arg));
|
||||
}
|
||||
} )
|
||||
)
|
||||
|
||||
|
||||
macro_rules! abort(
|
||||
macro_rules! rtabort(
|
||||
($( $msg:expr),+) => ( {
|
||||
rtdebug!($($msg),+);
|
||||
::rt::util::abort();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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!"); }
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue