This repository has been archived by the owner on Oct 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated java.util.concurrent.* packages to OpenJDK 7.
- Loading branch information
jfrijters
committed
Jul 6, 2011
1 parent
ae8dcb2
commit a38ec3e
Showing
12 changed files
with
479 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,45 @@ | ||
/* | ||
* Written by Doug Lea with assistance from members of JCP JSR-166 | ||
* Expert Group and released to the public domain, as explained at | ||
* http://creativecommons.org/licenses/publicdomain | ||
* 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 | ||
* published by the Free Software Foundation. Oracle designates this | ||
* particular file as subject to the "Classpath" exception as provided | ||
* by Oracle in the LICENSE file that accompanied this code. | ||
* | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 2 for more details (a copy is included in the LICENSE file that | ||
* accompanied this code). | ||
* | ||
* Modified for IKVM.NET by Jeroen Frijters | ||
* You should have received a copy of the GNU General Public License version | ||
* 2 along with this work; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
* or visit www.oracle.com if you need additional information or have any | ||
* questions. | ||
*/ | ||
|
||
/* | ||
Parts Copyright (C) 2006 Jeroen Frijters | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
Jeroen Frijters | ||
[email protected] | ||
*/ | ||
* This file is available under and governed by the GNU General Public | ||
* License version 2 only, as published by the Free Software Foundation. | ||
* However, the following notice accompanied the original version of this | ||
* file: | ||
* | ||
* Written by Doug Lea with assistance from members of JCP JSR-166 | ||
* Expert Group and released to the public domain, as explained at | ||
* http://creativecommons.org/publicdomain/zero/1.0/ | ||
*/ | ||
|
||
package java.util.concurrent.atomic; | ||
|
||
/** | ||
* A <tt>boolean</tt> value that may be updated atomically. See the | ||
* A {@code boolean} value that may be updated atomically. See the | ||
* {@link java.util.concurrent.atomic} package specification for | ||
* description of the properties of atomic variables. An | ||
* <tt>AtomicBoolean</tt> is used in applications such as atomically | ||
* {@code AtomicBoolean} is used in applications such as atomically | ||
* updated flags, and cannot be used as a replacement for a | ||
* {@link java.lang.Boolean}. | ||
* | ||
|
@@ -49,7 +52,7 @@ public class AtomicBoolean implements java.io.Serializable { | |
private volatile int value; | ||
|
||
/** | ||
* Creates a new <tt>AtomicBoolean</tt> with the given initial value. | ||
* Creates a new {@code AtomicBoolean} with the given initial value. | ||
* | ||
* @param initialValue the initial value | ||
*/ | ||
|
@@ -58,7 +61,7 @@ public AtomicBoolean(boolean initialValue) { | |
} | ||
|
||
/** | ||
* Creates a new <tt>AtomicBoolean</tt> with initial value <tt>false</tt>. | ||
* Creates a new {@code AtomicBoolean} with initial value {@code false}. | ||
*/ | ||
public AtomicBoolean() { | ||
} | ||
|
@@ -74,7 +77,7 @@ public final boolean get() { | |
|
||
/** | ||
* Atomically sets the value to the given updated value | ||
* if the current value <tt>==</tt> the expected value. | ||
* if the current value {@code ==} the expected value. | ||
* | ||
* @param expect the expected value | ||
* @param update the new value | ||
|
@@ -91,9 +94,11 @@ public final boolean compareAndSet(boolean expect, boolean update) { | |
|
||
/** | ||
* Atomically sets the value to the given updated value | ||
* if the current value <tt>==</tt> the expected value. | ||
* May fail spuriously and does not provide ordering guarantees, | ||
* so is only rarely an appropriate alternative to <tt>compareAndSet</tt>. | ||
* if the current value {@code ==} the expected value. | ||
* | ||
* <p>May <a href="package-summary.html#Spurious">fail spuriously</a> | ||
* and does not provide ordering guarantees, so is only rarely an | ||
* appropriate alternative to {@code compareAndSet}. | ||
* | ||
* @param expect the expected value | ||
* @param update the new value | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,48 @@ | ||
/* | ||
* Written by Doug Lea with assistance from members of JCP JSR-166 | ||
* Expert Group and released to the public domain, as explained at | ||
* http://creativecommons.org/licenses/publicdomain | ||
* 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 | ||
* published by the Free Software Foundation. Oracle designates this | ||
* particular file as subject to the "Classpath" exception as provided | ||
* by Oracle in the LICENSE file that accompanied this code. | ||
* | ||
* Modified for IKVM.NET by Jeroen Frijters | ||
* This code is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | ||
* version 2 for more details (a copy is included in the LICENSE file that | ||
* accompanied this code). | ||
* | ||
* You should have received a copy of the GNU General Public License version | ||
* 2 along with this work; if not, write to the Free Software Foundation, | ||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | ||
* | ||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | ||
* or visit www.oracle.com if you need additional information or have any | ||
* questions. | ||
*/ | ||
|
||
/* | ||
Parts Copyright (C) 2006-2011 Jeroen Frijters | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
Jeroen Frijters | ||
[email protected] | ||
*/ | ||
* This file is available under and governed by the GNU General Public | ||
* License version 2 only, as published by the Free Software Foundation. | ||
* However, the following notice accompanied the original version of this | ||
* file: | ||
* | ||
* Written by Doug Lea with assistance from members of JCP JSR-166 | ||
* Expert Group and released to the public domain, as explained at | ||
* http://creativecommons.org/publicdomain/zero/1.0/ | ||
*/ | ||
|
||
package java.util.concurrent.atomic; | ||
|
||
/** | ||
* An <tt>int</tt> value that may be updated atomically. See the | ||
* An {@code int} value that may be updated atomically. See the | ||
* {@link java.util.concurrent.atomic} package specification for | ||
* description of the properties of atomic variables. An | ||
* <tt>AtomicInteger</tt> is used in applications such as atomically | ||
* {@code AtomicInteger} is used in applications such as atomically | ||
* incremented counters, and cannot be used as a replacement for an | ||
* {@link java.lang.Integer}. However, this class does extend | ||
* <tt>Number</tt> to allow uniform access by tools and utilities that | ||
* {@code Number} to allow uniform access by tools and utilities that | ||
* deal with numerically-based classes. | ||
* | ||
* @since 1.5 | ||
|
@@ -60,7 +63,7 @@ public AtomicInteger(int initialValue) { | |
} | ||
|
||
/** | ||
* Creates a new AtomicInteger with initial value <tt>0</tt>. | ||
* Creates a new AtomicInteger with initial value {@code 0}. | ||
*/ | ||
public AtomicInteger() { | ||
} | ||
|
@@ -103,7 +106,7 @@ public final void lazySet(int newValue) { | |
|
||
/** | ||
* Atomically sets the value to the given updated value | ||
* if the current value <tt>==</tt> the expected value. | ||
* if the current value {@code ==} the expected value. | ||
* | ||
* @param expect the expected value | ||
* @param update the new value | ||
|
@@ -114,8 +117,11 @@ public final void lazySet(int newValue) { | |
|
||
/** | ||
* Atomically sets the value to the given updated value | ||
* if the current value <tt>==</tt> the expected value. | ||
* May fail spuriously. | ||
* if the current value {@code ==} the expected value. | ||
* | ||
* <p>May <a href="package-summary.html#Spurious">fail spuriously</a> | ||
* and does not provide ordering guarantees, so is only rarely an | ||
* appropriate alternative to {@code compareAndSet}. | ||
* | ||
* @param expect the expected value | ||
* @param update the new value | ||
|
Oops, something went wrong.