hotspot/src/os_cpu/solaris_x86/vm/atomic_solaris_x86.inline.hpp
changeset 7885 c02b05ba16a1
parent 7397 5b173b4ca846
child 15855 2ac9ebea17f3
equal deleted inserted replaced
7884:10a0fafc26aa 7885:c02b05ba16a1
     1 /*
     1 /*
     2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   149 
   149 
   150 inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value) {
   150 inline void*    Atomic::cmpxchg_ptr(void*    exchange_value, volatile void*     dest, void*    compare_value) {
   151   return (void*)cmpxchg((jint)exchange_value, (volatile jint*)dest, (jint)compare_value);
   151   return (void*)cmpxchg((jint)exchange_value, (volatile jint*)dest, (jint)compare_value);
   152 }
   152 }
   153 
   153 
   154 extern "C" void _Atomic_load_long(volatile jlong* src, volatile jlong* dst);
   154 extern "C" void _Atomic_move_long(volatile jlong* src, volatile jlong* dst);
   155 
   155 
   156 inline jlong Atomic::load(volatile jlong* src) {
   156 inline jlong Atomic::load(volatile jlong* src) {
   157   volatile jlong dest;
   157   volatile jlong dest;
   158   _Atomic_load_long(src, &dest);
   158   _Atomic_move_long(src, &dest);
   159   return dest;
   159   return dest;
       
   160 }
       
   161 
       
   162 inline void Atomic::store(jlong store_value, jlong* dest) {
       
   163   _Atomic_move_long((volatile jlong*)&store_value, (volatile jlong*)dest);
       
   164 }
       
   165 
       
   166 inline void Atomic::store(jlong store_value, volatile jlong* dest) {
       
   167   _Atomic_move_long((volatile jlong*)&store_value, dest);
   160 }
   168 }
   161 
   169 
   162 #endif // AMD64
   170 #endif // AMD64
   163 
   171 
   164 #ifdef _GNU_SOURCE
   172 #ifdef _GNU_SOURCE