This is simpler than the previous scheme, which tried to allocate the CRITICAL_SECTION struct in a thread-safe manner before it could use it to run the wrapped function in a thread-safe manner. Change-Id: I172e5544e5f16403a3a0e5e2b9104b1292a0d786