mesa/main: use p_atomic_inc_return instead of locking

There's no good reason for using a mutex here, as we have a simpler
primitive; atomic integers. So let's use that instead, to simplify
things a bit.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5901>
1 file changed