From 253fad77883869511e2030352e86904ac2165d7c Mon Sep 17 00:00:00 2001 From: Jeff Olson Date: Mon, 16 Apr 2012 23:21:27 -0700 Subject: replace impl of globa_async_handle with one using atomic compare-and-swap --- src/rt/rust_kernel.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/rt/rust_kernel.cpp') diff --git a/src/rt/rust_kernel.cpp b/src/rt/rust_kernel.cpp index 1ff6fad64ab..9afb010a3db 100644 --- a/src/rt/rust_kernel.cpp +++ b/src/rt/rust_kernel.cpp @@ -27,10 +27,9 @@ rust_kernel::rust_kernel(rust_env *env) : // set up storage of pointers needed to // access the global loop. global_loop_chan = 0; - int foo = 0; - async_handle_stub = (void*)&foo; - global_async_handle = &async_handle_stub; - *global_async_handle = (void*)0; + async_handle_inner = (uintptr_t)0; + global_async_handle = &async_handle_inner; + *global_async_handle = (uintptr_t)0; // Create the single threaded scheduler that will run on the platform's // main thread -- cgit 1.4.1-3-g733a5