about summary refs log tree commit diff
path: root/library/std/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2020-09-19 14:54:52 +0200
committerMara Bos <m-ou.se@m-ou.se>2020-09-27 11:56:43 +0200
commitf18f93d44cb2d95388865f98bb5938e572f0fc94 (patch)
treeed6e127366bb1151da7e5929972dd88a54225e24 /library/std/src
parentec13df4ec4780b679dde227db2185a82cf31c93b (diff)
downloadrust-f18f93d44cb2d95388865f98bb5938e572f0fc94.tar.gz
rust-f18f93d44cb2d95388865f98bb5938e572f0fc94.zip
Mark unpark() as #[inline].
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.