about summary refs log tree commit diff
path: root/src/libstd/rt
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2013-11-12 06:21:17 -0800
committerBrian Anderson <banderson@mozilla.com>2013-11-18 16:17:43 -0800
commitf4c222f7a3f21fd3fdc5df28f344988c103d17fa (patch)
tree8e2e309c3a897d0e9b2718894f5e11f1f001396c /src/libstd/rt
parent3d569df41de221ce5b0ffd385caaa9fd6d5fb2ff (diff)
downloadrust-f4c222f7a3f21fd3fdc5df28f344988c103d17fa.tar.gz
rust-f4c222f7a3f21fd3fdc5df28f344988c103d17fa.zip
rt: Namespace all C functions under rust_
Diffstat (limited to 'src/libstd/rt')
-rw-r--r--src/libstd/rt/basic.rs4
-rw-r--r--src/libstd/rt/context.rs12
2 files changed, 8 insertions, 8 deletions
diff --git a/src/libstd/rt/basic.rs b/src/libstd/rt/basic.rs
index 42ecbf5dc78..e8f6c4055a0 100644
--- a/src/libstd/rt/basic.rs
+++ b/src/libstd/rt/basic.rs
@@ -241,11 +241,11 @@ impl Drop for BasicPausible {
 
 fn time() -> Time {
     extern {
-        fn get_time(sec: &mut i64, nsec: &mut i32);
+        fn rust_get_time(sec: &mut i64, nsec: &mut i32);
     }
     let mut sec = 0;
     let mut nsec = 0;
-    unsafe { get_time(&mut sec, &mut nsec) }
+    unsafe { rust_get_time(&mut sec, &mut nsec) }
 
     Time { sec: sec as u64, nsec: nsec as u64 }
 }
diff --git a/src/libstd/rt/context.rs b/src/libstd/rt/context.rs
index fcc30ded954..6fcc8e32111 100644
--- a/src/libstd/rt/context.rs
+++ b/src/libstd/rt/context.rs
@@ -59,7 +59,7 @@ impl Context {
         // which we will then modify to call the given function when restored
         let mut regs = new_regs();
         unsafe {
-            swap_registers(transmute_mut_region(&mut *regs), transmute_region(&*regs));
+            rust_swap_registers(transmute_mut_region(&mut *regs), transmute_region(&*regs));
         };
 
         initialize_call_frame(&mut *regs, fp, argp, sp);
@@ -104,8 +104,8 @@ impl Context {
             // stack limit in the OS-specified TLS slot. This also  means that
             // we cannot call any more rust functions after record_stack_bounds
             // returns because they would all likely fail due to the limit being
-            // invalid for the current task. Lucky for us `swap_registers` is a
-            // C function so we don't have to worry about that!
+            // invalid for the current task. Lucky for us `rust_swap_registers`
+            // is a C function so we don't have to worry about that!
             match in_context.stack_bounds {
                 Some((lo, hi)) => record_stack_bounds(lo, hi),
                 // If we're going back to one of the original contexts or
@@ -113,13 +113,13 @@ impl Context {
                 // the stack limit to 0 to make morestack never fail
                 None => record_stack_bounds(0, uint::max_value),
             }
-            swap_registers(out_regs, in_regs)
+            rust_swap_registers(out_regs, in_regs)
         }
     }
 }
 
 extern {
-    fn swap_registers(out_regs: *mut Registers, in_regs: *Registers);
+    fn rust_swap_registers(out_regs: *mut Registers, in_regs: *Registers);
 }
 
 // Register contexts used in various architectures
@@ -142,7 +142,7 @@ extern {
 //
 // These structures/functions are roughly in-sync with the source files inside
 // of src/rt/arch/$arch. The only currently used function from those folders is
-// the `swap_registers` function, but that's only because for now segmented
+// the `rust_swap_registers` function, but that's only because for now segmented
 // stacks are disabled.
 
 #[cfg(target_arch = "x86")]