equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2015, 2017, 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. |
70 testAccess(t, V_OFFSET); |
70 testAccess(t, V_OFFSET); |
71 } |
71 } |
72 } |
72 } |
73 |
73 |
74 static void testAccess(Object base, long offset) { |
74 static void testAccess(Object base, long offset) { |
75 UNSAFE.compareAndSwapLong(base, offset, 1L, 2L); |
75 UNSAFE.compareAndSetLong(base, offset, 1L, 2L); |
76 UNSAFE.compareAndSwapLong(base, offset, 2L, 1L); |
76 UNSAFE.compareAndSetLong(base, offset, 2L, 1L); |
77 } |
77 } |
78 |
78 |
79 } |
79 } |
80 |
|