Sha256: 5fce929afd1b4da123dc741d7f3d6cef32399007f08153af465db64dc2fb9acd

Contents?: true

Size: 588 Bytes

Versions: 11

Compression:

Stored size: 588 Bytes

Contents

//! "Dummy" implementations of some system primitives for MIRI emulation.
//!
//! Note that at this time this is just enough to run some tests in MIRI but
//! notably WebAssembly tests are not executed at this time (MIRI can't execute
//! Cranelift-generated code).

use std::cell::Cell;

pub mod mmap;
pub mod traphandlers;
pub mod unwind;
pub mod vm;

std::thread_local!(static TLS: Cell<*mut u8> = const { Cell::new(std::ptr::null_mut()) });

#[inline]
pub fn tls_get() -> *mut u8 {
    TLS.with(|p| p.get())
}

#[inline]
pub fn tls_set(ptr: *mut u8) {
    TLS.with(|p| p.set(ptr));
}

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
wasmtime-29.0.0 ./ext/cargo-vendor/wasmtime-29.0.0/src/runtime/vm/sys/miri/mod.rs
wasmtime-28.0.0 ./ext/cargo-vendor/wasmtime-28.0.0/src/runtime/vm/sys/miri/mod.rs
wasmtime-27.0.0 ./ext/cargo-vendor/wasmtime-27.0.0/src/runtime/vm/sys/miri/mod.rs
wasmtime-26.0.0 ./ext/cargo-vendor/wasmtime-26.0.0/src/runtime/vm/sys/miri/mod.rs
wasmtime-25.0.2 ./ext/cargo-vendor/wasmtime-25.0.2/src/runtime/vm/sys/miri/mod.rs
wasmtime-25.0.1 ./ext/cargo-vendor/wasmtime-25.0.1/src/runtime/vm/sys/miri/mod.rs
wasmtime-25.0.0 ./ext/cargo-vendor/wasmtime-25.0.0/src/runtime/vm/sys/miri/mod.rs
wasmtime-24.0.0 ./ext/cargo-vendor/wasmtime-24.0.0/src/runtime/vm/sys/miri/mod.rs
wasmtime-23.0.2 ./ext/cargo-vendor/wasmtime-23.0.2/src/runtime/vm/sys/miri/mod.rs
wasmtime-22.0.0 ./ext/cargo-vendor/wasmtime-22.0.0/src/runtime/vm/sys/miri/mod.rs
wasmtime-21.0.1 ./ext/cargo-vendor/wasmtime-21.0.1/src/runtime/vm/sys/miri/mod.rs