comparison src/os_cpu/linux_zero/vm/atomic_linux_zero.inline.hpp @ 2256:173926398291

7018673: Zero: 6953144, 6990754 and 7009756 made some changes which broke Zero Reviewed-by: kvn, chrisphi, twisti
author twisti
date Fri, 11 Feb 2011 03:17:53 -0800
parents f95d63e2154a
children 63e54c37ac64
comparison
equal deleted inserted replaced
2255:bf29934d2f4f 2256:173926398291
1 /* 1 /*
2 * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
3 * Copyright 2007, 2008 Red Hat, Inc. 3 * Copyright 2007, 2008, 2011 Red Hat, Inc.
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * 5 *
6 * This code is free software; you can redistribute it and/or modify it 6 * This code is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 only, as 7 * under the terms of the GNU General Public License version 2 only, as
8 * published by the Free Software Foundation. 8 * published by the Free Software Foundation.
298 return (void *) cmpxchg_ptr((intptr_t) exchange_value, 298 return (void *) cmpxchg_ptr((intptr_t) exchange_value,
299 (volatile intptr_t*) dest, 299 (volatile intptr_t*) dest,
300 (intptr_t) compare_value); 300 (intptr_t) compare_value);
301 } 301 }
302 302
303 inline jlong Atomic::load(volatile jlong* src) {
304 volatile jlong dest;
305 os::atomic_copy64(src, &dest);
306 return dest;
307 }
308
309 inline void Atomic::store(jlong store_value, jlong* dest) {
310 os::atomic_copy64((volatile jlong*)&store_value, (volatile jlong*)dest);
311 }
312
313 inline void Atomic::store(jlong store_value, volatile jlong* dest) {
314 os::atomic_copy64((volatile jlong*)&store_value, dest);
315 }
316
303 #endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP 317 #endif // OS_CPU_LINUX_ZERO_VM_ATOMIC_LINUX_ZERO_INLINE_HPP