equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2010, 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. |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
20 * or visit www.oracle.com if you need additional information or have any |
20 * or visit www.oracle.com if you need additional information or have any |
21 * questions. |
21 * questions. |
22 * |
22 * |
23 */ |
23 */ |
|
24 |
|
25 #ifndef SHARE_VM_RUNTIME_ATOMIC_HPP |
|
26 #define SHARE_VM_RUNTIME_ATOMIC_HPP |
|
27 |
|
28 #include "memory/allocation.hpp" |
24 |
29 |
25 class Atomic : AllStatic { |
30 class Atomic : AllStatic { |
26 public: |
31 public: |
27 // Atomically store to a location |
32 // Atomically store to a location |
28 static void store (jbyte store_value, jbyte* dest); |
33 static void store (jbyte store_value, jbyte* dest); |
76 unsigned int compare_value); |
81 unsigned int compare_value); |
77 |
82 |
78 static intptr_t cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value); |
83 static intptr_t cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value); |
79 static void* cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value); |
84 static void* cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value); |
80 }; |
85 }; |
|
86 |
|
87 #endif // SHARE_VM_RUNTIME_ATOMIC_HPP |