about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src')
-rw-r--r--library/std/src/thread/mod.rs1
-rw-r--r--library/std/src/thread/parker/linux.rs1
2 files changed, 2 insertions, 0 deletions
diff --git a/library/std/src/thread/mod.rs b/library/std/src/thread/mod.rs
index a5a8d5c9fbb..45430e58cbb 100644
--- a/library/std/src/thread/mod.rs
+++ b/library/std/src/thread/mod.rs
@@ -1086,6 +1086,7 @@ impl Thread {
     /// parked_thread.join().unwrap();
     /// ```
     #[stable(feature = "rust1", since = "1.0.0")]
+    #[inline]
     pub fn unpark(&self) {
         self.inner.parker.unpark();
     }
diff --git a/library/std/src/thread/parker/linux.rs b/library/std/src/thread/parker/linux.rs
index 05142b88c73..2e238dcdc0b 100644
--- a/library/std/src/thread/parker/linux.rs
+++ b/library/std/src/thread/parker/linux.rs
@@ -57,6 +57,7 @@ impl Parker {
         }
     }
 
+    #[inline]
     pub fn unpark(&self) {
         // Change PARKED=>NOTIFIED, EMPTY=>NOTIFIED, or NOTIFIED=>NOTIFIED, and
         // wake the thread in the first case.