atomic.hpp revision 4272
1662N/A * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. 1662N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1662N/A * This code is free software; you can redistribute it and/or modify it 1662N/A * under the terms of the GNU General Public License version 2 only, as 1662N/A * published by the Free Software Foundation. 1662N/A * This code is distributed in the hope that it will be useful, but WITHOUT 1662N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1662N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1662N/A * version 2 for more details (a copy is included in the LICENSE file that 1662N/A * You should have received a copy of the GNU General Public License version 1662N/A * 2 along with this work; if not, write to the Free Software Foundation, 1662N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 1662N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 1662N/A // Atomic operations on jlong types are not available on all 32-bit 1662N/A // platforms. If atomic ops on jlongs are defined here they must only 1662N/A // be used from code that verifies they are available at runtime and 1662N/A // can provide an alternative action if not - see supports_cx8() for 1662N/A // a means to test availability. 1662N/A // Atomically store to a location 1662N/A // See comment above about using jlong atomics on 32-bit platforms 1662N/A // See comment above about using jlong atomics on 32-bit platforms 1662N/A // See comment above about using jlong atomics on 32-bit platforms 1662N/A // Atomically add to a location, return updated value 1662N/A // See comment above about using jlong atomics on 32-bit platforms 1662N/A // Atomically increment location 1662N/A // Atomically decrement a location 1662N/A // Performs atomic exchange of *dest with exchange_value. Returns old prior value of *dest. 1662N/A // Performs atomic compare of *dest and compare_value, and exchanges *dest with exchange_value 1662N/A // if the comparison succeeded. Returns prior value of *dest. Guarantees a two-way memory 1662N/A // barrier across the cmpxchg. I.e., it's really a 'fence_cmpxchg_acquire'. 1662N/A // See comment above about using jlong atomics on 32-bit platforms 1662N/A#
endif // SHARE_VM_RUNTIME_ATOMIC_HPP