8214271: Fast primitive to wake many threads
Robbin Ehn
robbin.ehn at oracle.com
Sat Nov 24 22:10:11 UTC 2018
Hi Andrew, thanks for having a look.
On 2018-11-24 12:12, Andrew Haley wrote:
> On 11/23/18 4:51 PM, Robbin Ehn wrote:
>> Webrev:
>> http://cr.openjdk.java.net/~rehn/8214271/webrev/
>
> The code is rather lightly commented. In particular, it's not
> clear that a wait() might return spuriously from a futex and how
> you deal with that. Is it the case that users of this API are to be
> exposed to spurious wakeups? If so, you must say so in the comments.
>
In my usage the futex is in the same memory location the entire processes
lifetime, therefore spurious wake ups with retval 0, AFAIK, do not happen?
But you are absolute right we should handle that. And EINTR totally slipped my
mind, so thanks!
Inc:
http://cr.openjdk.java.net/~rehn/8214271/2/inc/webrev/
Full:
http://cr.openjdk.java.net/~rehn/8214271/2/full/webrev/
/Robbin
More information about the hotspot-dev
mailing list