Create RAII lock guard for global initialization lock.

This patch is a part of a series of cleanups to cxa_guard.cpp.
It should introduce no functionality change.

This patch refactors the use of the global mutex and condvar into
a RAII lock guard class. This improves correctness (since unlocks can't
be forgotten). It also allows the unification of the non-threading and
threading implementations.

git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@357669 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed