diff options
| author | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-29 11:24:57 -0700 |
|---|---|---|
| committer | Tim Chevalier <chevalier@alum.wellesley.edu> | 2011-06-29 14:28:02 -0700 |
| commit | 1ba85932b1e11ae9db0e64dad20cd076db17aa1c (patch) | |
| tree | b195b4714a15206462f7be19c60011cafd4b7eb6 /src/rt/rust.cpp | |
| parent | d4b5b48e0a738dcb1b3d76295b525cd9147f64cb (diff) | |
| download | rust-1ba85932b1e11ae9db0e64dad20cd076db17aa1c.tar.gz rust-1ba85932b1e11ae9db0e64dad20cd076db17aa1c.zip | |
Add a runtime flag to enable/disable claims en masse
Now, if the environment variable CHECK_CLAIMS is set, then all claims turn into checks. Otherwise, claims are no-ops.
Diffstat (limited to 'src/rt/rust.cpp')
| -rw-r--r-- | src/rt/rust.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rt/rust.cpp b/src/rt/rust.cpp index 02ab54fd2e1..bd2a5ad1b95 100644 --- a/src/rt/rust.cpp +++ b/src/rt/rust.cpp @@ -91,10 +91,16 @@ int get_num_threads() * initialize the kernel, create the root domain and run it. */ +int check_claims = 0; + +void enable_claims(void* ck) { check_claims = (ck != 0); } + extern "C" CDECL int rust_start(uintptr_t main_fn, int argc, char **argv, void* crate_map) { update_log_settings(crate_map, getenv("RUST_LOG")); + enable_claims(getenv("CHECK_CLAIMS")); + rust_srv *srv = new rust_srv(); rust_kernel *kernel = new rust_kernel(srv); kernel->start(); |
