An atomic counter used to allocate thread IDs.
This sentinel is used to indicate that a guard has already been dropped
and should not be re-dropped. We use this because our drop code can be
called outside of Drop and thus there could be a bug in the internal
implementation that results in trying to put the same guard back into
the same pool multiple times, and that could result in UB if we
didn’t mark the guard as already having been put back in the pool.
A thread ID indicating that the special owner value is in use and not
available. This state is useful for avoiding a case where the owner
of a pool calls get
before putting the result of a previous get
call back into the pool.
A thread ID indicating that there is no owner. This is the initial
state of a pool. Once a pool has an owner, there is no way to change
it.