public static double addAndGetDouble(@org.jetbrains.annotations.NotNull @NotNull RandomDataInput in, long offset, double adding) throws BufferUnderflowException { try { for (; ; ) { long value = in.readVolatileLong(offset); double value1 = Double.longBitsToDouble(value) + adding; long value2 = Double.doubleToRawLongBits(value1); if (in.compareAndSwapLong(offset, value, value2)) return value1; } } catch (BufferOverflowException e) { throw new AssertionError(e); } }
public static long addAndGetLong(@org.jetbrains.annotations.NotNull @NotNull RandomDataInput in, long offset, long adding) throws BufferUnderflowException { try { for (; ; ) { long value = in.readVolatileLong(offset); long value2 = value + adding; if (in.compareAndSwapLong(offset, value, value2)) return value2; } } catch (BufferOverflowException e) { throw new AssertionError(e); } }