< prev index next >

src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp

Print this page
rev 13032 : [mq]: atomic_copy64

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
  * Copyright 2007, 2008, 2010 Red Hat, Inc.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as

@@ -33,11 +33,11 @@
   // Used to register dynamic code cache area with the OS
   // Note: Currently only used in 64 bit Windows implementations
   static bool register_code_area(char *low, char *high) { return true; }
 
   // Atomically copy 64 bits of data
-  static void atomic_copy64(volatile void *src, volatile void *dst) {
+  static void atomic_copy64(const volatile void *src, volatile void *dst) {
 #if defined(PPC32)
     double tmp;
     asm volatile ("lfd  %0, 0(%1)\n"
                   "stfd %0, 0(%2)\n"
                   : "=f"(tmp)

@@ -47,10 +47,10 @@
     asm volatile ("ld  %0, 0(%1)\n"
                   "std %0, 0(%2)\n"
                   : "=r"(tmp)
                   : "a"(src), "a"(dst));
 #else
-    *(jlong *) dst = *(jlong *) src;
+    *(jlong *) dst = *(const jlong *) src;
 #endif
   }
 
 #endif // OS_CPU_BSD_ZERO_VM_OS_BSD_ZERO_HPP
< prev index next >