]> git.lizzy.rs Git - rust.git/blobdiff - library/std/src/sys_common/mod.rs
Move thread parker to sys_common.
[rust.git] / library / std / src / sys_common / mod.rs
index 840f9093e00f15dd2ece0c6f81526db752e82ec1..234b257aa926e834666398a9a27796e05b12a871 100644 (file)
@@ -15,6 +15,9 @@
 #![allow(missing_docs)]
 #![allow(missing_debug_implementations)]
 
+#[cfg(test)]
+mod tests;
+
 use crate::sync::Once;
 use crate::sys;
 
@@ -63,6 +66,7 @@ macro_rules! rtunwrap {
 pub mod thread_info;
 pub mod thread_local_dtor;
 pub mod thread_local_key;
+pub mod thread_parker;
 pub mod util;
 pub mod wtf8;
 
@@ -141,8 +145,3 @@ pub fn mul_div_u64(value: u64, numer: u64, denom: u64) -> u64 {
     // r < denom, so (denom*numer) is the upper bound of (r*numer)
     q * numer + r * numer / denom
 }
-
-#[test]
-fn test_muldiv() {
-    assert_eq!(mul_div_u64(1_000_000_000_001, 1_000_000_000, 1_000_000), 1_000_000_000_001_000);
-}