That's a neat way to do it, if you are already happy being restricted to power-of-two buffer sizes. Since most buffer sizes in practical programs are picked as rough guestimates, that's no big loss.
You are also relying on putptr and getptr being atomically readable. That's fine with 8-bit variables, but is important to consider when using 16-bit counters for larger buffers on 8-bit micros.