equal
deleted
inserted
replaced
1 /* |
1 /* |
|
2 * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2016, Red Hat, Inc. All rights reserved. |
3 * Copyright (c) 2016, Red Hat, Inc. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
5 * |
5 * 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 |
6 * 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 |
51 throw new RuntimeException(e); |
52 throw new RuntimeException(e); |
52 } |
53 } |
53 } |
54 } |
54 |
55 |
55 static int m(TestCAEAntiDep test, Object expected, Object x) { |
56 static int m(TestCAEAntiDep test, Object expected, Object x) { |
56 C old = (C)UNSAFE.compareAndExchangeObjectVolatile(test, O_OFFSET, expected, x); |
57 C old = (C)UNSAFE.compareAndExchangeObject(test, O_OFFSET, expected, x); |
57 int res = old.f1; |
58 int res = old.f1; |
58 old.f1 = 0x42; |
59 old.f1 = 0x42; |
59 return res; |
60 return res; |
60 } |
61 } |
61 |
62 |