Expose pthread feature flag

The code was able to use pthread destructors rather than C++ thread
local destructors.  This removes the dependence on a C++ .so on linux.
However, this is not stable on other platforms such as Apple. Where the
C++ thread local state can be cleared before the pthread destructor
runs.
This commit is contained in:
Matthew Parkinson
2021-08-25 11:26:44 +01:00
committed by Matthew Parkinson
parent ea90f7b9c2
commit b52e2a6e27
4 changed files with 20 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
#ifdef SNMALLOC_USE_PTHREAD_DESTRUCTORS
# undef SNMALLOC_USE_PTHREAD_DESTRUCTORS
#endif
#include <snmalloc_core.h>
#include <test/setup.h>