Mercurial > hg > truffle
comparison src/share/vm/utilities/bitMap.cpp @ 14518:d8041d695d19
Merged with jdk9/dev/hotspot changeset 3812c088b945
author | twisti |
---|---|
date | Tue, 11 Mar 2014 18:45:59 -0700 |
parents | 8a9bb7821e28 |
children | 4ca6dc0799b6 78bbf4d43a14 |
comparison
equal
deleted
inserted
replaced
14141:f97c5ec83832 | 14518:d8041d695d19 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, 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. |
33 # include "os_solaris.inline.hpp" | 33 # include "os_solaris.inline.hpp" |
34 #endif | 34 #endif |
35 #ifdef TARGET_OS_FAMILY_windows | 35 #ifdef TARGET_OS_FAMILY_windows |
36 # include "os_windows.inline.hpp" | 36 # include "os_windows.inline.hpp" |
37 #endif | 37 #endif |
38 #ifdef TARGET_OS_FAMILY_aix | |
39 # include "os_aix.inline.hpp" | |
40 #endif | |
38 #ifdef TARGET_OS_FAMILY_bsd | 41 #ifdef TARGET_OS_FAMILY_bsd |
39 # include "os_bsd.inline.hpp" | 42 # include "os_bsd.inline.hpp" |
40 #endif | 43 #endif |
41 | 44 |
42 | 45 |
105 intptr_t mr = (intptr_t)inverted_bit_mask_for_range(beg, end); | 108 intptr_t mr = (intptr_t)inverted_bit_mask_for_range(beg, end); |
106 intptr_t nw = value ? (w | ~mr) : (w & mr); | 109 intptr_t nw = value ? (w | ~mr) : (w & mr); |
107 while (true) { | 110 while (true) { |
108 intptr_t res = Atomic::cmpxchg_ptr(nw, pw, w); | 111 intptr_t res = Atomic::cmpxchg_ptr(nw, pw, w); |
109 if (res == w) break; | 112 if (res == w) break; |
110 w = *pw; | 113 w = res; |
111 nw = value ? (w | ~mr) : (w & mr); | 114 nw = value ? (w | ~mr) : (w & mr); |
112 } | 115 } |
113 } | 116 } |
114 } | 117 } |
115 | 118 |