diff options
Diffstat (limited to 'src/libstd/sys/wasm/alloc.rs')
| -rw-r--r-- | src/libstd/sys/wasm/alloc.rs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/libstd/sys/wasm/alloc.rs b/src/libstd/sys/wasm/alloc.rs index 0faa3c9a740..f082887ce20 100644 --- a/src/libstd/sys/wasm/alloc.rs +++ b/src/libstd/sys/wasm/alloc.rs @@ -1,13 +1,3 @@ -// Copyright 2018 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or -// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license -// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - //! This is an implementation of a global allocator on the wasm32 platform when //! emscripten is not in use. In that situation there's no actual runtime for us //! to lean on for allocation, so instead we provide our own! @@ -74,7 +64,7 @@ mod lock { return DropLock } unsafe { - let r = wasm32::atomic::wait_i32( + let r = wasm32::i32_atomic_wait( &LOCKED as *const AtomicI32 as *mut i32, 1, // expected value -1, // timeout @@ -89,7 +79,7 @@ mod lock { let r = LOCKED.swap(0, SeqCst); debug_assert_eq!(r, 1); unsafe { - wasm32::atomic::wake( + wasm32::atomic_notify( &LOCKED as *const AtomicI32 as *mut i32, 1, // only one thread ); |
