> On Sep 22, 2016, at 8:34 AM, Xuelei Fan <xuelei....@oracle.com> wrote: > > > latch = (latch + 1) & 0x7FFFFFFF; // Mask the sign bit > I'm fine with it. > > BTW, if you like, I may suggest to use a little bit small number for the > mask, for example 0x1FFFFFFF, so that the counter variable does not overflow > either. It works if counter overflow, but better not if we want the counter > meaningful.
Good idea. --Max