# HG changeset patch # User acorn # Date 1286212270 14400 # Node ID d49132ce025bed6a0e25e488e37b03d4f8f8140c # Parent 5ef5663b9cac60f267d30ad1a6a4055163e43772 6763959: java.util.concurrent.locks.LockSupport.parkUntil(0) blocks forever Summary: Absolute time 0 needs to return immediately. Reviewed-by: phh, dcubed, dholmes diff -r 5ef5663b9cac -r d49132ce025b hotspot/src/os/linux/vm/os_linux.cpp --- a/hotspot/src/os/linux/vm/os_linux.cpp Tue Sep 21 06:58:44 2010 -0700 +++ b/hotspot/src/os/linux/vm/os_linux.cpp Mon Oct 04 13:11:10 2010 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -4839,7 +4839,7 @@ // Next, demultiplex/decode time arguments timespec absTime; - if (time < 0) { // don't wait at all + if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all return; } if (time > 0) { diff -r 5ef5663b9cac -r d49132ce025b hotspot/src/os/solaris/vm/os_solaris.cpp --- a/hotspot/src/os/solaris/vm/os_solaris.cpp Tue Sep 21 06:58:44 2010 -0700 +++ b/hotspot/src/os/solaris/vm/os_solaris.cpp Mon Oct 04 13:11:10 2010 -0400 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -5837,7 +5837,7 @@ // First, demultiplex/decode time arguments timespec absTime; - if (time < 0) { // don't wait at all + if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all return; } if (time > 0) { diff -r 5ef5663b9cac -r d49132ce025b hotspot/src/os/windows/vm/os_windows.cpp --- a/hotspot/src/os/windows/vm/os_windows.cpp Tue Sep 21 06:58:44 2010 -0700 +++ b/hotspot/src/os/windows/vm/os_windows.cpp Mon Oct 04 13:11:10 2010 -0400 @@ -3992,7 +3992,7 @@ if (time < 0) { // don't wait return; } - else if (time == 0) { + else if (time == 0 && !isAbsolute) { time = INFINITE; } else if (isAbsolute) {