On Sat, May 11, 2013 at 3:37 AM, Alexander Turner <nerdscent...@gmail.com>wrote:
> Would not atomic increment and atomic decrement solve the multi-interrupt > issue you suggest here? Such an approach is a little more costly because in > the case of very high contention the setters need to spin to get the > increment/decrement required if using pure CAS. That could be a lot of > cache flushes - but it would then be strictly correct (I don't actually > know how gcc or any other compiler goes about implementing add/sub): > > __sync_fetch_and_sub > __sync_fetch_and_add > Yes, we could guarantee that all interrupts get seen and cleared independently if we used an interrupt counter...but it's clear that's not provided for by the contract of current Thread#interrupt logic, regardless of how atomic you try to make it. - Charlie
_______________________________________________ mlvm-dev mailing list mlvm-dev@openjdk.java.net http://mail.openjdk.java.net/mailman/listinfo/mlvm-dev