replace impl of globa_async_handle with one using atomic compare-and-swap

This commit is contained in:
Jeff Olson
2012-04-16 23:21:27 -07:00
committed by Brian Anderson
parent d7a87aa0a1
commit 253fad7788
5 changed files with 43 additions and 29 deletions

View File

@@ -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