3 ms·
But I think InterlockedIncrement is just 'lock xaddl x 1', so using InterlockedIncrement would be to do it manually. I'm asking if any compiler can take a stat
by chrisseaton 11y ago
But I think InterlockedIncrement is just 'lock xaddl x 1', so using InterlockedIncrement would be to do it manually.
I'm asking if any compiler can take a statement which uses a high level, general purpose lock and increments a variable inside it using conventional language expressions, and convert it to use 'lock xaddl x 1' (perhaps via InterlockedIncrement or whatever other intrinsics you have) instead.
I only know Java well, not .NET, but I'm pretty sure no Java compiler does it.
- pjmlp 11y agoAh, I missed the point.