about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2014-10-30 11:12:04 +0000
committerbors <bors@rust-lang.org>2014-10-30 11:12:04 +0000
commitad4557ce76ccf8d774bd28b6d7a4e43e73200f21 (patch)
tree851622cd4c07788ba349496f928cd48f560c7122
parentc40fc79a1adb2564c6233605771bdeaecf348864 (diff)
parentaa242e721a72292638872294d1b8f54caf91e3c8 (diff)
downloadrust-ad4557ce76ccf8d774bd28b6d7a4e43e73200f21.tar.gz
rust-ad4557ce76ccf8d774bd28b6d7a4e43e73200f21.zip
auto merge of #18367 : pcwalton/rust/inline-atomic-constructors, r=thestinger
Servo really wants this.

r? @brson
-rw-r--r--src/libcore/atomic.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libcore/atomic.rs b/src/libcore/atomic.rs
index f272465e796..c3172a66f6b 100644
--- a/src/libcore/atomic.rs
+++ b/src/libcore/atomic.rs
@@ -94,6 +94,7 @@ const UINT_TRUE: uint = -1;
 #[stable]
 impl AtomicBool {
     /// Create a new `AtomicBool`
+    #[inline]
     pub fn new(v: bool) -> AtomicBool {
         let val = if v { UINT_TRUE } else { 0 };
         AtomicBool { v: UnsafeCell::new(val), nocopy: marker::NoCopy }
@@ -305,6 +306,7 @@ impl AtomicBool {
 #[stable]
 impl AtomicInt {
     /// Create a new `AtomicInt`
+    #[inline]
     pub fn new(v: int) -> AtomicInt {
         AtomicInt {v: UnsafeCell::new(v), nocopy: marker::NoCopy}
     }
@@ -426,6 +428,7 @@ impl AtomicInt {
 #[stable]
 impl AtomicUint {
     /// Create a new `AtomicUint`
+    #[inline]
     pub fn new(v: uint) -> AtomicUint {
         AtomicUint { v: UnsafeCell::new(v), nocopy: marker::NoCopy }
     }
@@ -547,6 +550,7 @@ impl AtomicUint {
 #[stable]
 impl<T> AtomicPtr<T> {
     /// Create a new `AtomicPtr`
+    #[inline]
     pub fn new(p: *mut T) -> AtomicPtr<T> {
         AtomicPtr { p: UnsafeCell::new(p as uint), nocopy: marker::NoCopy }
     }