]> git.lizzy.rs Git - rust.git/commitdiff
rustup
authorRalf Jung <post@ralfj.de>
Sat, 4 Jun 2022 23:43:46 +0000 (19:43 -0400)
committerRalf Jung <post@ralfj.de>
Sat, 4 Jun 2022 23:43:46 +0000 (19:43 -0400)
rust-version
src/shims/windows/dlsym.rs
src/shims/windows/foreign_items.rs

index 09a847a94fbe62882132b8887ee98213c066dad1..e7a7ad9dd818c10cfe6dc24fc8f97cd2c5ae0342 100644 (file)
@@ -1 +1 @@
-c35035cefc709abddabfb28ecc6a326458d46ce2
+4e725bad73747a4c93a3ac53106e4b4006edc665
index fb0c334b3d938cf056a55eb41386bee078077c93..60ef11b7960885f3744ffbc1f54bc138ce12dcbc 100644 (file)
@@ -18,6 +18,7 @@ impl Dlsym {
     pub fn from_str<'tcx>(name: &str) -> InterpResult<'tcx, Option<Dlsym>> {
         Ok(match name {
             "GetSystemTimePreciseAsFileTime" => None,
+            "SetThreadDescription" => None,
             "NtWriteFile" => Some(Dlsym::NtWriteFile),
             _ => throw_unsup_format!("unsupported Windows dlsym: {}", name),
         })
index 1a9b2300f723cddf5ad0ef8d11fc1f42fe4df0a7..05f9aed1747651bf9b50b26532a90320db2a4fa6 100644 (file)
@@ -415,6 +415,10 @@ fn emulate_foreign_item_by_name(
                 // There is only one thread, so this always succeeds and returns TRUE.
                 this.write_scalar(Scalar::from_i32(1), dest)?;
             }
+            "GetCurrentThread" if this.frame_in_std() => {
+                let [] = this.check_shim(abi, Abi::System { unwind: false }, link_name, args)?;
+                this.write_scalar(Scalar::from_machine_isize(1, this), dest)?;
+            }
 
             _ => return Ok(EmulateByNameResult::NotSupported),
         }